78% wpclothes2order

Code Review | WPClothes2Order

WordPress plugin WPClothes2Order scored78%from 54 tests.

About plugin

  • Plugin page: wpclothes2order
  • Plugin version: 1.0.11
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2022
  • Latest release: Aug 29, 2023
  • Number of updates: 13
  • Update frequency: every 26.1 days
  • Top authors: ashleyredman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,080 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
Install script ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼2.37ms] Passed 4 tests

An overview of server-side resources used by WPClothes2Order
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3243.84 ▲4.75
Dashboard /wp-admin3.69 ▲0.3848.57 ▼2.14
Posts /wp-admin/edit.php3.74 ▲0.3844.83 ▼0.94
Add New Post /wp-admin/post-new.php6.21 ▲0.3280.12 ▼10.78
Media Library /wp-admin/upload.php3.55 ▲0.3237.23 ▲4.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 491 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WPClothes2Order
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.38 ▼0.011.71 ▲0.0143.75 ▼1.97
Dashboard /wp-admin2,201 ▲245.69 ▲0.0692.19 ▼5.9241.73 ▼4.83
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0733.95 ▼12.0634.29 ▼4.80
Add New Post /wp-admin/post-new.php1,532 ▲422.93 ▲0.04666.02 ▲14.2955.43 ▲3.51
Media Library /wp-admin/upload.php1,409 ▲94.18 ▲0.0296.54 ▼9.4844.28 ▼1.27

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 117× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/core/Pimple/Exception/ExpectedInvokableException.php:36
    • > PHP Notice
      Undefined variable: errors in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 35
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/templates/Container/post_meta.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/core/Datastore/Comment_Meta_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/templates/Container/nav_menu_item.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Time_Field' not found in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/core/Field/Date_Time_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Predefined_Options_Field' not found in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/core/Field/Select_Field.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/core/Datastore/Term_Meta_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Parent_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/wpclothes2order/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Template_Condition.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention: The official readme.txt might help

wpclothes2order/wpclothes2order.php 85% from 13 tests

Analyzing the main PHP file in "WPClothes2Order" version 1.0.11
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

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
There were no executable files found in this plugin33,900 lines of code in 436 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1757,09910,93616,203
PHP1722,8207,36710,986
PO File288981,1112,411
CSS82401,1572,222
Sass4936531,868
JSON200157
Markdown215053

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.41
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces24
Interfaces5
Traits0
Classes133
▷ Abstract classes118.27%
▷ Concrete classes12291.73%
▷ Final classes21.64%
Methods951
▷ Static methods10711.25%
▷ Public methods77181.07%
▷ Protected methods16517.35%
▷ Private methods151.58%
Functions135
▷ Named functions5238.52%
▷ Anonymous functions8361.48%
Constants48
▷ Global constants2347.92%
▷ Class constants2552.08%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin