62% minimal-responsive-pricing-table

Code Review | Minimal Responsive Pricing Table

WordPress plugin Minimal Responsive Pricing Table scored62%from 54 tests.

About plugin

  • Plugin page: minimal-responsiv...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2015
  • Latest release: Jan 29, 2016
  • Number of updates: 7
  • Update frequency: every 18.9 days
  • Top authors: mas1f (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,049 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.13MB] [CPU: ▼44.88ms] Passed 4 tests

An overview of server-side resources used by Minimal Responsive Pricing Table
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6214.89 ▼22.38
Dashboard /wp-admin2.88 ▼0.4316.16 ▼30.53
Posts /wp-admin/edit.php2.88 ▼0.4815.58 ▼36.46
Add New Post /wp-admin/post-new.php2.88 ▼3.0117.99 ▼90.14
Media Library /wp-admin/upload.php2.88 ▼0.3515.67 ▼16.25
Add New /wp-admin/post-new.php?post_type=mrpt_pricing_table2.8816.66
All Pricing Tables /wp-admin/edit.php?post_type=mrpt_pricing_table2.8825.59

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

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

Browser metrics Passed 4 tests

Minimal Responsive Pricing Table: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲18914.00 ▼0.644.77 ▲3.0751.07 ▲8.00
Dashboard /wp-admin2,245 ▲575.87 ▲1.00108.00 ▼3.0040.17 ▼7.00
Posts /wp-admin/edit.php2,128 ▲362.04 ▲0.0438.67 ▼10.3033.66 ▼2.61
Add New Post /wp-admin/post-new.php1,550 ▲3123.13 ▲0.17666.84 ▲70.2754.89 ▼7.00
Media Library /wp-admin/upload.php1,430 ▲394.28 ▲0.0494.81 ▲0.1945.24 ▲3.02
Add New /wp-admin/post-new.php?post_type=mrpt_pricing_table2,5463.6697.5190.87
All Pricing Tables /wp-admin/edit.php?post_type=mrpt_pricing_table1,0971.9834.4729.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/minimal-responsive-pricing-table/includes/minimal_pricing_post_type.php+11
    Undefined variable: post_type_prefix
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 39 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=mrpt_pricing_table
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/minimal-responsive-pricing-table/includes/minimal_pricing_post_type.php+23
    Undefined variable: post_type_prefix

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/minimal-responsive-pricing-table/admin/partials/mini-res-pt-admin-display.php
    • > /wp-content/plugins/minimal-responsive-pricing-table/public/partials/mini-res-pt-public-display.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/minimal-responsive-pricing-table/public/layout_red.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimal-responsive-pricing-table/includes/cmb2/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/minimal-responsive-pricing-table/public/layout_blue.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/minimal-responsive-pricing-table/public/layout_darkblue.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/minimal-responsive-pricing-table/public/layout_green.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimal-responsive-pricing-table/includes/minimal_pricing_post_type.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/minimal-responsive-pricing-table/admin/message-updated.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/minimal-responsive-pricing-table/includes/cmb2/bootstrap.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (This is light blue layout (Front View)), #2 (This is pink/red layout (Front View)), #3 (This is dark blue layout (Front View)), #4 (This is light green layout (Front View))
Please take inspiration from this readme.txt

minimal-responsive-pricing-table/mini-res-pt.php 85% from 13 tests

The primary PHP file in "Minimal Responsive Pricing Table" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("minimal-responsive-pricing-table.php" instead of "mini-res-pt.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected45,998 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
PO File11912,61416,20928,917
CSS91,0281,04610,780
PHP331,1052,5743,467
JavaScript87433682,231
Markdown21110315
SVG100288

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity27.30
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods216
▷ Static methods2210.19%
▷ Public methods20193.06%
▷ Protected methods73.24%
▷ Private methods83.70%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
29 PNG files occupy 0.38MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png30.01KB14.17KB▼ 52.80%
includes/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/layouts/blue.png23.01KB6.01KB▼ 73.88%