67% pricex-lite

Code Review | Pricex Lite

WordPress plugin Pricex Lite scored67%from 54 tests.

About plugin

  • Plugin page: pricex-lite
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0.2
  • WordPress version: 6.3.1
  • First release: Aug 20, 2017
  • Latest release: Oct 1, 2022
  • Number of updates: 8
  • Update frequency: every 233.5 days
  • Top authors: themelooks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,420 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.51MB] [CPU: ▼38.87ms] Passed 4 tests

A check of server-side resources used by Pricex Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4230.53 ▼13.10
Dashboard /wp-admin3.43 ▲0.1323.59 ▼26.81
Posts /wp-admin/edit.php3.43 ▲0.0823.65 ▼26.44
Add New Post /wp-admin/post-new.php3.43 ▼2.4520.93 ▼83.76
Media Library /wp-admin/upload.php3.43 ▲0.2024.88 ▼18.46
Settings /wp-admin/admin.php?page=pricex-setting-admin3.4321.65
Categories /wp-admin/edit-tags.php?taxonomy=pricex_categories&post_type=pricex_pricing3.4423.11
All PriceX /wp-admin/edit.php?post_type=pricex_pricing3.4425.91
Add New /wp-admin/post-new.php?post_type=pricex_pricing3.4323.78
Recommended Plugins /wp-admin/admin.php?page=pricex-recommended-plugin3.4321.83

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pricex Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,024 ▲26313.62 ▼0.7410.45 ▲8.7057.56 ▲13.83
Dashboard /wp-admin2,277 ▲1065.86 ▲0.2190.83 ▼10.1641.44 ▼1.30
Posts /wp-admin/edit.php2,181 ▲842.30 ▲0.3042.06 ▲4.0336.04 ▼6.41
Add New Post /wp-admin/post-new.php1,590 ▲6423.39 ▼0.09620.54 ▼34.5134.09 ▼15.57
Media Library /wp-admin/upload.php1,476 ▲854.39 ▲0.18132.76 ▲32.4148.51 ▲6.92
Settings /wp-admin/admin.php?page=pricex-setting-admin1,2902.5540.4232.53
Categories /wp-admin/edit-tags.php?taxonomy=pricex_categories&post_type=pricex_pricing1,3612.0631.5131.88
All PriceX /wp-admin/edit.php?post_type=pricex_pricing1,1572.2337.1829.18
Add New /wp-admin/post-new.php?post_type=pricex_pricing1,5882.7354.5432.61
Recommended Plugins /wp-admin/admin.php?page=pricex-recommended-plugin1,2611.8832.6333.11

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
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/pricex-lite/inc/cmb2/includes/helper-functions.php+44
    include_once(wp-content/plugins/pricex-lite/inc/cmb2/includes/CMB2_Hookup.php): failed to open stream: No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pricex-recommended-plugin
    • > Warning in wp-content/plugins/pricex-lite/inc/cmb2/includes/helper-functions.php+44
    include_once(wp-content/plugins/pricex-lite/inc/cmb2/includes/CMB2_Hookup.php): failed to open stream: No such file or directory
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pricex-recommended-plugin
    • > Warning in wp-content/plugins/pricex-lite/inc/cmb2/includes/helper-functions.php+44
    include_once(): Failed opening 'wp-content/plugins/pricex-lite/inc/cmb2/includes/CMB2_Hookup.php' for inclusion (include_path='.:/usr/share/php')
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pricex-recommended-plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'CMB2_Hookup' not found

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
  • 45× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/pricex-lite/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pricex-lite/inc/pricex-config.php:69
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup' not found in wp-content/plugins/pricex-lite/inc/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/pricex-lite/inc/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/pricex-lite/inc/cmb2/includes/types/CMB2_Type_Counter_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pricex-lite/inc/pricex-enqueue.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/pricex-lite/inc/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pricex-lite/inc/cpt.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/pricex-lite/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/pricex-lite/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 (/assets/screenshot-1.jpg), #2 (/assets/screenshot-2.jpg), #3 (/assets/screenshot-3.jpg), #4 (/assets/Screenshot_4.png)
  • Requires php: Invalid plugin version format
The official readme.txt is a good inspiration

pricex-lite/pricex-lite.php 85% from 13 tests

The main file in "Pricex Lite" v. 1.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected54,451 lines of code in 240 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP642,2746,4538,136
CSS233661,3635,417
JSON2004,264
JavaScript103676061,484
Sass17305291,407
Markdown32390735
SVG100685

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity18.96
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes70
▷ Abstract classes912.86%
▷ Concrete classes6187.14%
▷ Final classes00.00%
Methods555
▷ Static methods9316.76%
▷ Public methods46082.88%
▷ Protected methods8916.04%
▷ Private methods61.08%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
inc/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
inc/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
inc/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
inc/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%