67% wp-adpt

Code Review | Advanced Dynamic Pricing Table

WordPress plugin Advanced Dynamic Pricing Table scored67%from 54 tests.

About plugin

  • Plugin page: wp-adpt
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 28, 2022
  • Latest release: Apr 28, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: tareqtori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /188 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.43MB] [CPU: ▼2.50ms] Passed 4 tests

Analyzing server-side resources used by Advanced Dynamic Pricing Table
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4439.27 ▼6.39
Dashboard /wp-admin3.74 ▲0.4456.85 ▲1.60
Posts /wp-admin/edit.php3.80 ▲0.4459.69 ▲6.36
Add New Post /wp-admin/post-new.php6.34 ▲0.4597.15 ▼6.33
Media Library /wp-admin/upload.php3.64 ▲0.4139.23 ▲1.14
All Pricing Tables /wp-admin/edit.php?post_type=adpt3.7145.41
Add Pricing Table /wp-admin/post-new.php?post_type=adpt3.8462.59

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 583 new files
Database: 1 new table, 6 new options
New tables
wp_adpt_order
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Advanced Dynamic Pricing Table: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,256 ▲49519.01 ▲4.347.78 ▲5.8643.04 ▼0.70
Dashboard /wp-admin2,543 ▲3409.32 ▲4.43192.32 ▲83.8743.57 ▼1.37
Posts /wp-admin/edit.php2,448 ▲3456.19 ▲4.1787.52 ▲48.9238.70 ▲4.76
Add New Post /wp-admin/post-new.php1,634 ▲10519.93 ▲2.42704.18 ▲80.1336.76 ▼8.81
Media Library /wp-admin/upload.php1,588 ▲1856.74 ▲2.53107.14 ▲4.2644.41 ▼3.50
All Pricing Tables /wp-admin/edit.php?post_type=adpt1,4296.0882.8127.05
Add Pricing Table /wp-admin/post-new.php?post_type=adpt2,6108.48134.7538.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 failed, leaving 1 table in the database
    • wp_adpt_order
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-adpt/carbon-fields/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 213× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/htmlburger/carbon-fields/core/Service/Legacy_Storage_Service_v_1_5.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/composer/installers/src/Composer/Installers/GravInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/htmlburger/carbon-fields/core/Widget/Widget.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Parent_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-adpt/carbon-fields/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: wordpress, pricing table

wp-adpt/adpt.php 62% from 13 tests

The main PHP script in "Advanced Dynamic Pricing Table" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-adpt.php" instead of "adpt.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 182 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin31,319 lines of code in 529 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1755,2058,47413,029
PHP2572,9577,08911,484
PO File268191,0202,202
CSS113481,1542,007
Sass4833901,769
JSON500639
YAML3303118
Markdown426071

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.47
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces24
Interfaces5
Traits0
Classes223
▷ Abstract classes125.38%
▷ Concrete classes21194.62%
▷ Final classes10.47%
Methods1,004
▷ Static methods919.06%
▷ Public methods79178.78%
▷ Protected methods20220.12%
▷ Private methods111.10%
Functions126
▷ Named functions4031.75%
▷ Anonymous functions8668.25%
Constants34
▷ Global constants720.59%
▷ Class constants2779.41%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected