84% pricing-tables-pro

Code Review | Pricing Tables Pro

WordPress plugin Pricing Tables Pro scored84%from 54 tests.

About plugin

  • Plugin page: pricing-tables-pro
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2015
  • Latest release: Jul 20, 2015
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: Metrocraft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼1.47ms] Passed 4 tests

Analyzing server-side resources used by Pricing Tables Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2745.34 ▼5.23
Dashboard /wp-admin3.68 ▲0.3855.00 ▼1.59
Posts /wp-admin/edit.php3.71 ▲0.3554.74 ▲3.20
Add New Post /wp-admin/post-new.php6.21 ▲0.3294.02 ▼1.61
Media Library /wp-admin/upload.php3.54 ▲0.3139.64 ▲2.56
Pricing Tables /wp-admin/edit.php?post_type=mc_ptp_pricing_table3.5944.61
Add New /wp-admin/post-new.php?post_type=mc_ptp_pricing_table3.9949.17

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pricing Tables Pro
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.76 ▲0.212.23 ▲0.2044.34 ▼2.11
Dashboard /wp-admin2,238 ▲615.68 ▲0.0696.42 ▼4.0343.15 ▼2.54
Posts /wp-admin/edit.php2,136 ▲362.01 ▲0.0639.34 ▲0.7533.93 ▲1.48
Add New Post /wp-admin/post-new.php1,436 ▼9318.37 ▼5.16606.70 ▼50.0449.79 ▼9.93
Media Library /wp-admin/upload.php1,443 ▲464.23 ▲0.0397.91 ▼4.7842.21 ▼1.01
Pricing Tables /wp-admin/edit.php?post_type=mc_ptp_pricing_table1,1121.9834.2630.55
Add New /wp-admin/post-new.php?post_type=mc_ptp_pricing_table1,7522.5954.0665.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/pricing-tables-pro/cmb2/bootstrap.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pricing-tables-pro/pricing-tables-pro.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pricing-tables-pro/cmb2/init.php:119

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

pricing-tables-pro/pricing-tables-pro.php Passed 13 tests

"Pricing Tables Pro" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
23 characters long description:
A pricing table plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin7,622 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS51,0801,0254,196
PHP158911,9152,804
JavaScript3158115622

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity39.92
▷ Minimum class complexity3.00
▷ Maximum class complexity107.00
Average method complexity3.69
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods188
▷ Static methods2010.64%
▷ Public methods17894.68%
▷ Protected methods73.72%
▷ Private methods31.60%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%