84% partner-manager

Code Review | Partner Manager

WordPress plugin Partner Manager scored84%from 54 tests.

About plugin

  • Plugin page: partner-manager
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Oct 25, 2017
  • Latest release: Jan 30, 2018
  • Number of updates: 4
  • Update frequency: every 24.3 days
  • Top authors: eriksaulnier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /814 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.13MB] [CPU: ▼5.28ms] Passed 4 tests

An overview of server-side resources used by Partner Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.18 ▼4.64
Dashboard /wp-admin3.43 ▲0.1245.10 ▼4.52
Posts /wp-admin/edit.php3.54 ▲0.1848.73 ▲1.46
Add New Post /wp-admin/post-new.php6.01 ▲0.1381.10 ▼13.42
Media Library /wp-admin/upload.php3.35 ▲0.1237.05 ▲3.35
Add New /wp-admin/post-new.php?post_type=partner3.4147.49
All Partners /wp-admin/edit.php?post_type=partner3.3935.96

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_partner-manager-widget

Browser metrics Passed 4 tests

Checking browser requirements for Partner Manager
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲14614.05 ▼0.546.98 ▲4.9040.49 ▼7.22
Dashboard /wp-admin2,233 ▲425.85 ▼0.05102.46 ▼4.6140.15 ▼0.17
Posts /wp-admin/edit.php2,116 ▲242.05 ▲0.0440.73 ▲1.1735.18 ▼1.68
Add New Post /wp-admin/post-new.php1,556 ▲1423.36 ▲4.85671.86 ▲21.0860.06 ▲5.59
Media Library /wp-admin/upload.php1,409 ▲214.20 ▲0.0594.49 ▼6.8240.91 ▼7.97
Add New /wp-admin/post-new.php?post_type=partner1,6733.6462.3434.19
All Partners /wp-admin/edit.php?post_type=partner1,0801.9529.7130.46

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_partner-manager-widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% 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 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/partner-manager/public/partials/partner-manager-shortcode-list.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/partner-manager/includes/class-partner-manager-widget.php:14

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: sponsors, partners, shortcode, slider, carousel...

partner-manager/partner-manager.php Passed 13 tests

The main PHP script in "Partner Manager" version 1.0.0 is automatically included on every request by WordPress
60 characters long description:
Allows site administrators to manage the site's partners and

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
Success! There were no dangerous files found in this plugin769 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP15121574432
CSS2317204
Sass1161111
JavaScript21022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.44
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3181.58%
▷ Protected methods00.00%
▷ Private methods718.42%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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