67% awesome-pricing-tables-lite-by-optimalplugins

Code Review | Pricing Tables for WP

WordPress plugin Pricing Tables for WP scored67%from 54 tests.

About plugin

  • Plugin page: awesome-pricing-t...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Mar 15, 2016
  • Number of updates: 5
  • Update frequency: every 18.4 days
  • Top authors: optimalplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,526 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.81ms] Passed 4 tests

This is a short check of server-side resources used by Pricing Tables for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.27 ▲3.48
Dashboard /wp-admin3.39 ▲0.0944.81 ▼2.60
Posts /wp-admin/edit.php3.51 ▲0.1544.37 ▼1.92
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.91 ▼3.05
Media Library /wp-admin/upload.php3.32 ▲0.0933.45 ▼3.65
Add New /wp-admin/admin.php?page=optimal-pricing-tbl-new3.5332.13
Pricing Table /wp-admin/admin.php?page=optimal-pricing-tbl3.3334.45

Server storage [IO: ▲1.71MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 80 new files
Database: 2 new tables, 6 new options
New tables
wp_optimal_pricing_tbl
wp_optimal_pricing_tbl_templates
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Pricing Tables for WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲5114.17 ▼0.181.76 ▲0.2846.32 ▲3.31
Dashboard /wp-admin2,215 ▲355.54 ▼0.1280.92 ▼4.7136.90 ▼9.67
Posts /wp-admin/edit.php2,123 ▲232.03 ▲0.0536.41 ▲1.0533.92 ▼1.11
Add New Post /wp-admin/post-new.php1,556 ▲3018.15 ▼4.85593.98 ▼87.6872.20 ▲17.46
Media Library /wp-admin/upload.php1,420 ▲234.20 ▼0.0598.91 ▼0.6643.30 ▼3.15
Add New /wp-admin/admin.php?page=optimal-pricing-tbl-new2,6633.7080.6283.77
Pricing Table /wp-admin/admin.php?page=optimal-pricing-tbl9282.0124.7325.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_optimal_pricing_tbl
    • wp_optimal_pricing_tbl_templates
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/awesome-pricing-tables-lite-by-optimalplugins/OPT/Admin/Pages/GlobalCSS.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function prepare() on null in wp-content/plugins/awesome-pricing-tables-lite-by-optimalplugins/OPT/Admin/Pages/template.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #2 (Additional settings of [Pricing Tables for WP Pro](http://demo.optimalplugins.com/pricing-tables-for-wp-pro/))
Please take inspiration from this readme.txt

awesome-pricing-tables-lite-by-optimalplugins/pricing-tables-for-wp.php 85% from 13 tests

The main file in "Pricing Tables for WP" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("awesome-pricing-tables-lite-by-optimalplugins.php" instead of "pricing-tables-for-wp.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("3.6" instead of "3.8")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected21,770 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript474,56880118,967
PHP103211421,662
CSS4478596
SVG100520
YAML14016
HTML1309

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 158)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity31.75
▷ Minimum class complexity2.00
▷ Maximum class complexity182.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity158.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods62
▷ Static methods914.52%
▷ Public methods4267.74%
▷ Protected methods00.00%
▷ Private methods2032.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.20MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png59.54KB24.86KB▼ 58.25%
js/jscolor/hv.png2.80KB7.32KB0.00%
assets/icon-256x256.png7.18KB3.03KB▼ 57.75%
assets/banner-772x250.png135.45KB41.73KB▼ 69.19%
js/jscolor/hs.png2.62KB7.54KB0.00%