78% order-approval-for-wcfm

Code Review | Order approval for WCFM

WordPress plugin Order approval for WCFM scored78%from 54 tests.

About plugin

  • Plugin page: order-approval-fo...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4
  • WordPress version: 6.3.1
  • First release: Aug 22, 2023
  • Latest release: Nov 1, 2023
  • Number of updates: 11
  • Update frequency: every 6.6 days
  • Top authors: sarankumar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /275 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.48ms] Passed 4 tests

This is a short check of server-side resources used by Order approval for WCFM
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1741.26 ▼1.36
Dashboard /wp-admin3.47 ▲0.1348.60 ▼12.93
Posts /wp-admin/edit.php3.59 ▲0.2352.87 ▲1.18
Add New Post /wp-admin/post-new.php6.08 ▲0.1884.39 ▼8.80
Media Library /wp-admin/upload.php3.40 ▲0.1637.72 ▲1.76

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

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

Browser metrics Passed 4 tests

Order approval for WCFM: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.37 ▼0.998.31 ▲6.7046.53 ▲2.52
Dashboard /wp-admin2,232 ▲525.52 ▼0.0887.37 ▲0.2040.38 ▲3.87
Posts /wp-admin/edit.php2,137 ▲372.15 ▲0.1648.54 ▲8.7336.99 ▲0.11
Add New Post /wp-admin/post-new.php1,558 ▲3022.83 ▼0.26628.07 ▼93.7868.88 ▲9.39
Media Library /wp-admin/upload.php1,434 ▲374.17 ▼0.0697.27 ▼24.0145.55 ▼1.89

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/order-approval-for-wcfm/admin/partials/order-approval-for-wcfm-admin-display.php
    • > /wp-content/plugins/order-approval-for-wcfm/public/partials/order-approval-for-wcfm-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sevengits\\is_admin() in wp-content/plugins/order-approval-for-wcfm/plugin-deactivation-survey/deactivate-feedback-form.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Orders listing screen showing approve and reject buttons.) image missing
You can take inspiration from this readme.txt

order-approval-for-wcfm/order-approval-for-wcfm.php 85% from 13 tests

The main PHP script in "Order approval for WCFM" version 1.0.3 is automatically included on every request by WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 144 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "3.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,162 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP14196899697
CSS710259314
JavaScript53166133
Markdown17018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods45
▷ Static methods36.67%
▷ Public methods2964.44%
▷ Protected methods817.78%
▷ Private methods817.78%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin