77% easy-pricing-tables

Code Review | Pricing Tables WordPress Plugin - Easy Pricing Tables

WordPress plugin Pricing Tables WordPress Plugin - Easy Pricing Tables scored77%from 54 tests.

About plugin

  • Plugin page: easy-pricing-tables
  • Plugin version: 3.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Oct 7, 2013
  • Latest release: Sep 27, 2023
  • Number of updates: 159
  • Update frequency: every 23.1 days
  • Top authors: davidhme (69.81%)flippy101 (13.21%)RyanNovotny (11.95%)fatcatapps (6.92%)

Code review

54 tests

User reviews

128 reviews

Install metrics

20,000+ active /757,037 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼0.83ms] 75% from 4 tests

An overview of server-side resources used by Pricing Tables WordPress Plugin - Easy Pricing Tables
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 5,559.57ms on /wp-admin/edit.php?post_type=easy-pricing-table&page=fca-featured-plugins)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.14 ▲0.27
Dashboard /wp-admin3.35 ▲0.0547.56 ▼1.87
Posts /wp-admin/edit.php3.40 ▲0.0550.30 ▼1.69
Add New Post /wp-admin/post-new.php5.94 ▲0.05101.33 ▼0.04
Media Library /wp-admin/upload.php3.28 ▲0.0540.05 ▲7.37
Add New /wp-admin/edit.php?post_type=easy-pricing-table&page=ept3-list-new3.2434.35
Settings /wp-admin/edit.php?post_type=easy-pricing-table&page=easy-pricing-tables-settings3.2433.37
Upgrade to Premium /wp-admin/edit.php?post_type=easy-pricing-table&page=easy-pricing-tables-upgrade3.2532.36
Easy Pricing Tables /wp-admin/edit.php?post_type=easy-pricing-table&page=ept3-list3.2537.80
Featured Plugins /wp-admin/edit.php?post_type=easy-pricing-table&page=fca-featured-plugins3.795,559.57

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 133 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
dh_ptp_show_review_notice

Browser metrics Passed 4 tests

Pricing Tables WordPress Plugin - Easy Pricing Tables: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.38 ▼0.011.58 ▼0.3141.12 ▼2.33
Dashboard /wp-admin2,245 ▲655.61 ▼0.0889.68 ▼0.1681.97 ▲39.25
Posts /wp-admin/edit.php2,147 ▲472.00 ▼0.0039.43 ▲2.9836.89 ▲2.01
Add New Post /wp-admin/post-new.php6,253 ▲4,72119.12 ▼4.16905.37 ▲205.2863.68 ▲7.90
Media Library /wp-admin/upload.php1,447 ▲444.17 ▼0.12104.22 ▲0.0170.70 ▲24.63
Add New /wp-admin/edit.php?post_type=easy-pricing-table&page=ept3-list-new1,7112.3833.4135.62
Settings /wp-admin/edit.php?post_type=easy-pricing-table&page=easy-pricing-tables-settings8562.2024.7227.66
Upgrade to Premium /wp-admin/edit.php?post_type=easy-pricing-table&page=easy-pricing-tables-upgrade2,3986.47338.41173.12
Easy Pricing Tables /wp-admin/edit.php?post_type=easy-pricing-table&page=ept3-list1,0352.0926.2227.34
Featured Plugins /wp-admin/edit.php?post_type=easy-pricing-table&page=fca-featured-plugins1,6203.5045.6553.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • dh_ptp_show_review_notice

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-advanced-settings.php
  • 52× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      include(PTP_PLUGIN_PATH/includes/metaboxes/metabox-blocks/advanced-settings/design6-settings.php): failed to open stream: No such file or directory in wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-advanced-settings.php on line 9
    • > PHP Warning
      Use of undefined constant PTP_PLUGIN_PATH - assumed 'PTP_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-advanced-settings.php on line 10
    • > PHP Warning
      include(PTP_PLUGIN_PATH/includes/metaboxes/metabox-blocks/advanced-settings/stylish-flat-settings.php): failed to open stream: No such file or directory in wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-advanced-settings.php on line 6
    • > PHP Warning
      include(PTP_PLUGIN_PATH/includes/metaboxes/metabox-blocks/advanced-settings/design5-settings.php): failed to open stream: No such file or directory in wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-advanced-settings.php on line 8
    • > PHP Warning
      Use of undefined constant PTP_PLUGIN_PATH - assumed 'PTP_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-advanced-settings.php on line 13
    • > PHP Warning
      Use of undefined constant PTP_PLUGIN_PATH - assumed 'PTP_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-pricing-tables/includes/table-generation/table-generator.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-pricing-tables/includes/notices/notices.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/easy-pricing-tables/pricing-table-plugin.php:19
    • > PHP Warning
      include(): Failed opening 'PTP_PLUGIN_PATH/includes/metaboxes/metabox-blocks/advanced-settings/comparison1-settings.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-advanced-settings.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-pricing-tables/includes/metaboxes/metabox-blocks/tab-content.php:23

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Creating a pricing table), #2 (Example of a published pricing table), #3 (Another example of a published pricing table), #4 (Another example of a published pricing table), #5 (Plugin dashboard, showing saved tables and shortcode feature), #6 (Easy Pricing Tables Premium layouts), #7 (Design editor of Easy Pricing Tables Premium), #8 (Premium pricing table with toggle), #9 (Premium comparison table with toggle), #10 (Premium pricing table layout), #11 (Premium pricing table layout with inline images), #12 (Premium pricing table layout with inline images)
The official readme.txt might help

easy-pricing-tables/pricing-table-plugin.php 85% from 13 tests

The main file in "Pricing Tables WordPress Plugin - Easy Pricing Tables" v. 3.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 149 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-pricing-tables.php" instead of "pricing-table-plugin.php")

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
Good job! No executable or dangerous file extensions detected12,230 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP249641,1484,356
JavaScript297702894,113
CSS251872041,888
PO File48921,3931,856
SVG10017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity92.33
▷ Minimum class complexity17.00
▷ Maximum class complexity242.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods76
▷ Static methods810.53%
▷ Public methods6585.53%
▷ Protected methods1013.16%
▷ Private methods11.32%
Functions64
▷ Named functions64100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
36 PNG files occupy 2.13MB with 1.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-9.png70.51KB19.64KB▼ 72.15%
assets/ui/img/comparison1.png45.14KB12.39KB▼ 72.54%
screenshot-4.png59.95KB16.17KB▼ 73.02%
assets/images/placeholder-300.png2.49KB1.20KB▼ 51.81%
assets/ui/ui-components/colorbox/images/border2.png0.17KB0.16KB▼ 2.35%