84% 4partners

Code Review | 4partners

WordPress plugin 4partners scored84%from 54 tests.

About plugin

  • Plugin page: 4partners
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2022
  • Latest release: Nov 11, 2022
  • Number of updates: 13
  • Update frequency: every 3.9 days
  • Top authors: dropshipping4partners (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by 4partners
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.75 ▼4.73
Dashboard /wp-admin3.32 ▲0.0143.83 ▼2.31
Posts /wp-admin/edit.php3.37 ▲0.0146.73 ▼2.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.20 ▼13.88
Media Library /wp-admin/upload.php3.24 ▲0.0134.80 ▲1.81

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 41 new files
Database: 1 new table, 7 new options
New tables
wp_4partners_synchronization_version
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
Activated_Plugin
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for 4partners
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.16 ▼1.141.70 ▼0.1342.64 ▼2.80
Dashboard /wp-admin2,209 ▲184.85 ▼0.05105.82 ▲3.8640.17 ▼3.17
Posts /wp-admin/edit.php2,095 ▲62.01 ▲0.0136.96 ▼7.3835.22 ▼1.01
Add New Post /wp-admin/post-new.php1,539 ▲123.34 ▲0.17642.18 ▲35.6648.24 ▼8.61
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0294.44 ▼1.9341.54 ▼0.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • Activated_Plugin
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PHPSTORM_META\\override() in wp-content/plugins/4partners/.phpstorm.meta.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/4partners/4partners.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% 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
No tags were detected

4partners/4partners.php 92% from 13 tests

"4partners" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Make the plugin description longer than 10 characters (currently 1 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,075 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP306795402,691
CSS1130129
PO File1313986
JavaScript119553
Markdown122041
XML1174334
JSON20032
SVG1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.30
▷ Minimum class complexity1.00
▷ Maximum class complexity84.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods162
▷ Static methods2012.35%
▷ Public methods14891.36%
▷ Protected methods00.00%
▷ Private methods148.64%
Functions10
▷ Named functions110.00%
▷ Anonymous functions990.00%
Constants26
▷ Global constants00.00%
▷ Class constants26100.00%
▷ Public constants26100.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
PNG images were not found in this plugin