84% is-user-premium

Code Review | Is user premium

WordPress plugin Is user premium scored 84% from 54 tests.

About plugin

  • Plugin page: is-user-premium
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 24, 2014
  • Latest release: Jun 27, 2015
  • Number of updates: 20
  • Update frequency: every 12.5 days
  • Top authors: Vesuvium (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.93ms] Passed 4 tests

This is a short check of server-side resources used by Is user premium
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.26 ▼0.49
Dashboard /wp-admin3.36 ▲0.0645.29 ▼3.33
Posts /wp-admin/edit.php3.48 ▲0.1245.38 ▼3.45
Add New Post /wp-admin/post-new.php5.94 ▲0.0693.11 ▼0.43
Media Library /wp-admin/upload.php3.29 ▲0.0634.19 ▲4.59
IUP settings /wp-admin/options-general.php?page=iup-settings-page3.2530.21

Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
iup_meta
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Is user premium
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.71 ▼0.721.63 ▲0.0239.47 ▼4.29
Dashboard /wp-admin2,210 ▲224.84 ▼0.07108.71 ▲1.9035.65 ▼7.49
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0140.41 ▲5.5733.98 ▲2.05
Add New Post /wp-admin/post-new.php1,537 ▲2323.01 ▲5.52639.03 ▼28.2846.43 ▼14.70
Media Library /wp-admin/upload.php1,392 ▲44.19 ▲0.0293.98 ▼4.4740.58 ▼0.97
IUP settings /wp-admin/options-general.php?page=iup-settings-page9772.0328.3535.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • iup_meta
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/is-user-premium/is-user-premium.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Settings page (first part)), #2 (Settings page (second part)), #3 (The button displayed to a logged-in user)
You can look at the official readme.txt

is-user-premium/is-user-premium.php 92% from 13 tests

"Is user premium" version 0.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin418 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44883418

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods5
▷ Static methods360.00%
▷ Public methods240.00%
▷ Protected methods360.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png11.82KB5.14KB▼ 56.49%
screenshot-2.png57.80KB21.52KB▼ 62.76%
screenshot-1.png88.86KB31.17KB▼ 64.92%