10% display-opencart-category

Code Review | Display OpenCart Category

WordPress plugin Display OpenCart Category scored10%from 54 tests.

About plugin

  • Plugin page: display-opencart-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Jan 10, 2014
  • Latest release: Mar 1, 2014
  • Number of updates: 23
  • Update frequency: every 2.2 days
  • Top authors: anybuy.vn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,036 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-includes/class-wpdb.php+2035
    mysqli_real_connect(): (HY000/1045): Access denied for user ''@'localhost' (using password: YES)

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.84ms] Passed 4 tests

A check of server-side resources used by Display OpenCart Category
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.25 ▲1.06
Dashboard /wp-admin3.31 ▼0.0443.77 ▼17.77
Posts /wp-admin/edit.php3.36 ▲0.0045.90 ▲2.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.40 ▼16.90
Media Library /wp-admin/upload.php3.23 ▲0.0034.50 ▲2.24

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

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

Browser metrics Passed 4 tests

Display OpenCart Category: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.351.90 ▲0.1645.97 ▲10.03
Dashboard /wp-admin2,206 ▲214.82 ▼1.00108.87 ▲1.6141.94 ▼2.24
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0341.62 ▲4.9434.84 ▼3.84
Add New Post /wp-admin/post-new.php1,533 ▲1423.18 ▼0.03608.22 ▼84.4062.10 ▲2.58
Media Library /wp-admin/upload.php1,388 ▼04.32 ▲0.0696.43 ▼10.1742.29 ▼4.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-opencart-category/wpdocc_main.php:10
    • > PHP Notice
      Undefined index: wpdocc_hidden in wp-content/plugins/display-opencart-category/wpdocc_admin.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/display-opencart-category/wpdocc_admin.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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:
  • Tested up to: Version format is invalid
The official readme.txt might help

display-opencart-category/wpdocc_main.php 85% from 13 tests

The principal PHP file in "Display OpenCart Category" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("display-opencart-category.php" instead of "wpdocc_main.php")

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 plugin141 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2415141

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin