84% partnero

Code Review | Partnero

WordPress plugin Partnero scored84%from 54 tests.

About plugin

  • Plugin page: partnero
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Aug 15, 2023
  • Latest release: Nov 11, 2023
  • Number of updates: 10
  • Update frequency: every 9.2 days
  • Top authors: partnero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /126 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.71ms] Passed 4 tests

Analyzing server-side resources used by Partnero
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.59 ▲1.54
Dashboard /wp-admin3.40 ▲0.0645.20 ▼16.47
Posts /wp-admin/edit.php3.52 ▲0.1648.10 ▲2.13
Add New Post /wp-admin/post-new.php5.98 ▲0.1083.55 ▼12.20
Media Library /wp-admin/upload.php3.32 ▲0.1034.49 ▲0.29

Server storage [IO: ▲0.08MB] [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: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Partnero
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4314.61 ▲0.281.62 ▼0.0238.44 ▼4.69
Dashboard /wp-admin2,210 ▲355.56 ▼0.1494.12 ▼19.7584.31 ▲39.47
Posts /wp-admin/edit.php2,118 ▲211.95 ▲0.0134.90 ▼3.2733.39 ▲0.46
Add New Post /wp-admin/post-new.php1,553 ▲2723.06 ▼0.02705.34 ▲37.8254.35 ▼8.38
Media Library /wp-admin/upload.php1,418 ▲214.20 ▲0.0996.81 ▼3.1876.55 ▲27.89

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/partnero/admin/template/dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/partnero/admin/template/api-key-form.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: affiliate, statistics, analytics, analysis, partnero

partnero/partnero.php 92% from 13 tests

"Partnero" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 187 characters long)

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
No dangerous file extensions were detected1,021 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13191564677
CSS1670325
SVG10019

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.35
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods1739.53%
▷ Public methods3581.40%
▷ Protected methods00.00%
▷ Private methods818.60%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/menu-icon.png3.75KB0.39KB▼ 89.51%