84% wopo-toolkit

Code Review | WoPo Toolkit

WordPress plugin WoPo Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: wopo-toolkit
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2019
  • Latest release: Jul 17, 2023
  • Number of updates: 25
  • Update frequency: every 55.3 days
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲2.55ms] Passed 4 tests

A check of server-side resources used by WoPo Toolkit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.76 ▲7.78
Dashboard /wp-admin3.33 ▲0.0348.63 ▼0.22
Posts /wp-admin/edit.php3.38 ▲0.0350.78 ▲5.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.21 ▲1.53
Media Library /wp-admin/upload.php3.25 ▲0.0338.37 ▲3.37

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WoPo Toolkit
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲24013.98 ▼0.678.97 ▲7.2536.78 ▼10.29
Dashboard /wp-admin2,286 ▲955.91 ▲1.00108.04 ▲0.3838.46 ▲1.33
Posts /wp-admin/edit.php2,166 ▲802.07 ▲0.0739.65 ▲4.5136.17 ▲0.92
Add New Post /wp-admin/post-new.php1,527 ▼117.62 ▼0.57692.21 ▲67.5549.38 ▼4.99
Media Library /wp-admin/upload.php1,465 ▲834.22 ▲0.0698.22 ▼2.4242.38 ▼1.68

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wopo-toolkit/include/tools.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wopo-toolkit/include/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wopo-toolkit/wopo-toolkit.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: nbdesigner, themeforest, dokan, wopo, printshop...

wopo-toolkit/wopo-toolkit.php 85% from 13 tests

Analyzing the main PHP file in "WoPo Toolkit" version 1.2.0
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin813 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP312346679
CSS211086
JavaScript20548

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions1986.36%
▷ Anonymous functions313.64%
Constants0
▷ Global constants00.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 are no PNG files in this plugin