58% wp-pricing-table

Code Review | WP Pricing Table

WordPress plugin WP Pricing Table scored58%from 54 tests.

About plugin

  • Plugin page: wp-pricing-table
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2013
  • Latest release: Jul 7, 2013
  • Number of updates: 4
  • Update frequency: every 7.5 days
  • Top authors: CodeCabin (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

20+ active /3,797 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.75ms] Passed 4 tests

A check of server-side resources used by WP Pricing Table
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.59 ▲1.28
Dashboard /wp-admin3.32 ▲0.0147.39 ▲3.27
Posts /wp-admin/edit.php3.37 ▲0.0144.57 ▲0.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.92 ▼12.61
Media Library /wp-admin/upload.php3.24 ▲0.0134.77 ▼0.04
Price Tables /wp-admin/admin.php?page=wp-pricing-table-menu3.1828.75
Settings /wp-admin/admin.php?page=wp-pricing-table-menu-settings3.2130.78

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: 1 new table, 7 new options
New tables
wp_wppt_tables
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
wppt_db_version

Browser metrics Passed 4 tests

WP Pricing Table: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲16213.56 ▼0.814.93 ▲3.1445.09 ▲2.73
Dashboard /wp-admin2,233 ▲454.84 ▼1.07109.58 ▲5.5245.20 ▲1.37
Posts /wp-admin/edit.php2,116 ▲272.00 ▲0.0034.34 ▼2.2034.02 ▼2.47
Add New Post /wp-admin/post-new.php1,557 ▲2923.12 ▲4.61587.50 ▼24.4651.53 ▼7.33
Media Library /wp-admin/upload.php1,418 ▲304.22 ▼0.0798.33 ▲2.1243.52 ▲0.70
Price Tables /wp-admin/admin.php?page=wp-pricing-table-menu8142.0324.4138.29
Settings /wp-admin/admin.php?page=wp-pricing-table-menu-settings9751.8528.7537.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wppt_deactivate' not found or invalid function name
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_wppt_tables
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • wppt_db_version
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=wp-pricing-table-menu
    • > Notice in wp-content/plugins/wp-pricing-table/wp-pricing-table.php+182
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=wp-pricing-table-menu
    • > Notice in wp-content/plugins/wp-pricing-table/wp-pricing-table.php+337
    Undefined variable: trashlink

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-pricing-table/wp-pricing-table.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Example of a price table), #2 (Back end settings), #3 (Complete customization)
The official readme.txt is a good inspiration

wp-pricing-table/wp-pricing-table.php 92% from 13 tests

The entry point to "WP Pricing Table" version 1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,282 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript213841821
PHP110913460
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/hs.png2.62KB7.54KB0.00%
js/hv.png2.80KB7.32KB0.00%
images/pro_version.png29.50KB10.89KB▼ 63.10%
images/basic_version.png8.13KB3.37KB▼ 58.51%