84% convead-for-woocommerce

Code Review | Convead

WordPress plugin Convead scored84%from 54 tests.

About plugin

  • Plugin page: convead-for-wooco...
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.0
  • WordPress version: 6.3.1
  • First release: Jul 17, 2015
  • Latest release: Mar 27, 2019
  • Number of updates: 26
  • Update frequency: every 51.9 days
  • Top authors: convead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,146 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Convead
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.96 ▼5.00
Dashboard /wp-admin3.32 ▲0.0142.46 ▼8.39
Posts /wp-admin/edit.php3.37 ▲0.0145.48 ▼1.10
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.63 ▼11.17
Media Library /wp-admin/upload.php3.24 ▲0.0138.70 ▲2.52
Convead /wp-admin/plugins.php?page=convead3.2730.24

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
convead_plgn_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Convead: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼1.064.31 ▲2.3737.70 ▼4.87
Dashboard /wp-admin2,210 ▲225.83 ▲0.92116.26 ▲6.8642.85 ▼3.42
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0041.25 ▲6.9236.15 ▼3.60
Add New Post /wp-admin/post-new.php1,549 ▲2118.47 ▲0.15607.61 ▼39.9872.07 ▲17.66
Media Library /wp-admin/upload.php1,395 ▲44.21 ▼0.0199.22 ▼2.6542.07 ▼1.16
Convead /wp-admin/plugins.php?page=convead8411.6829.0131.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • convead_plgn_options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/convead-for-woocommerce/convead.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/convead-for-woocommerce/tmpl/adminform.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/convead-for-woocommerce/tmpl/adminform.php on line 10
    • > PHP Notice
      Undefined variable: convead_plgn_options in wp-content/plugins/convead-for-woocommerce/tmpl/adminform.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/convead-for-woocommerce/tmpl/adminform.php on line 9
    • > PHP Notice
      Undefined variable: convead_plgn_options in wp-content/plugins/convead-for-woocommerce/tmpl/adminform.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
6 plugin tags: woocommerce, e-commerce, analytics, convead, email campaigns...

convead-for-woocommerce/convead.php 85% from 13 tests

The main PHP file in "Convead" ver. 1.1.7 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("convead-for-woocommerce.php" instead of "convead.php")
  • Description: Please use more than 10 characters for the plugin description (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin836 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4171170760
PO File1151649
Markdown19026
HTML1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity63.00
▷ Minimum class complexity45.00
▷ Maximum class complexity81.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods45
▷ Static methods2351.11%
▷ Public methods2351.11%
▷ Protected methods00.00%
▷ Private methods2248.89%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin