83% dk-pricr-responsive-pricing-table

Code Review | Responsive Pricing Table

WordPress plugin Responsive Pricing Table scored83%from 54 tests.

About plugin

  • Plugin page: dk-pricr-responsi...
  • Plugin version: 5.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2014
  • Latest release: Oct 13, 2023
  • Number of updates: 263
  • Update frequency: every 12.6 days
  • Top authors: spwebguy (100%)

Code review

54 tests

User reviews

87 reviews

Install metrics

20,000+ active /420,757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.22MB] [CPU: ▼2.04ms] Passed 4 tests

This is a short check of server-side resources used by Responsive Pricing Table
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2141.20 ▲3.45
Dashboard /wp-admin3.51 ▲0.2149.90 ▲2.66
Posts /wp-admin/edit.php3.62 ▲0.2746.79 ▼5.05
Add New Post /wp-admin/post-new.php6.14 ▲0.2684.65 ▼6.97
Media Library /wp-admin/upload.php3.43 ▲0.2036.69 ▲1.21
Add New /wp-admin/post-new.php?post_type=rpt_pricing_table3.4742.86
All Pricing Tables /wp-admin/edit.php?post_type=rpt_pricing_table3.4831.89

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Responsive Pricing Table
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13513.48 ▼0.878.57 ▲6.6044.62 ▲7.84
Dashboard /wp-admin2,219 ▲415.59 ▼0.1486.36 ▼20.9043.38 ▼1.31
Posts /wp-admin/edit.php2,106 ▲62.02 ▲0.0835.35 ▼5.1432.27 ▼4.19
Add New Post /wp-admin/post-new.php1,546 ▲1823.23 ▲0.27656.83 ▲74.9853.99 ▲6.34
Media Library /wp-admin/upload.php1,424 ▲244.22 ▲0.0494.62 ▼0.1239.74 ▼0.48
Add New /wp-admin/post-new.php?post_type=rpt_pricing_table2,3383.1071.5351.48
All Pricing Tables /wp-admin/edit.php?post_type=rpt_pricing_table1,1112.5145.5428.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-text-domain.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-metaboxes-pro.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-front-scripts.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-shortcode-column.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-admin-scripts.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-metaboxes-help.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dk-pricr-responsive-pricing-table/rpt.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-post-type.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-metaboxes-plans.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-pro-version-check.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: responsive, prices, price, pricing, pricing tables...

dk-pricr-responsive-pricing-table/rpt.php 85% from 13 tests

"Responsive Pricing Table" version 5.1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 444 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("dk-pricr-responsive-pricing-table.php" instead of "rpt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,268 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP132921171,112
CSS419165717
JavaScript4149116439

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 1.01MB with 0.68MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/image_7432.png41.65KB22.53KB▼ 45.91%
inc/img/rpt_recommended.png3.41KB0.45KB▼ 86.90%
inc/img/image_7433.png984.11KB282.97KB▼ 71.25%