84% partnify

Code Review | Partnify Partner Plugin WordPress

WordPress plugin Partnify Partner Plugin WordPress scored 84% from 54 tests.

About plugin

  • Plugin page: partnify
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.4
  • WordPress version: 5.8.1
  • First release: May 30, 2018
  • Latest release: Jun 20, 2018
  • Number of updates: 9
  • Update frequency: every 14.0 days
  • Top authors: partnify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 468 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.07MB] [CPU: ▼180.44ms] Passed 4 tests

An overview of server-side resources used by Partnify Partner Plugin WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0628.19 ▲3.72
Dashboard /wp-admin3.15 ▲0.0842.52 ▲0.45
Posts /wp-admin/edit.php3.26 ▲0.1534.20 ▲1.63
Add New Post /wp-admin/post-new.php5.51 ▲0.0772.06 ▼721.75
Media Library /wp-admin/upload.php3.09 ▲0.0922.22 ▼2.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 1 new option
New WordPress options
widget_wp_partnify_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Partnify Partner Plugin WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,696 ▲9515.52 ▼0.3411.18 ▲5.9474.77 ▼3.72
Dashboard /wp-admin2,958 ▲596.21 ▲0.03114.50 ▼14.67187.32 ▲20.91
Posts /wp-admin/edit.php2,770 ▲273.13 ▼0.1064.28 ▲1.29144.74 ▲5.68
Add New Post /wp-admin/post-new.php1,549 ▼2,26416.18 ▼2.73308.52 ▼140.82182.36 ▲15.35
Media Library /wp-admin/upload.php1,778 ▲295.56 ▲0.06123.61 ▼17.51200.82 ▲16.85

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 did not uninstall successfully, leaving 1 option in the database
    • widget_wp_partnify_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/partnify/inc/admin/admin-assets.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: marketing, saas, partnify integrations, partner, partnify...

partnify/partnify.php Passed 13 tests

The main file in "Partnify Partner Plugin WordPress" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
118 characters long description:
Partnify for WordPress by Partnify. Inserts via a widget selectable display ads to your WordPress site to earn income.

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 detected546 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP777129353
JavaScript32530125
CSS114068

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.00
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods13
▷ Static methods17.69%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-40.png4.44KB1.92KB▼ 56.66%
assets/images/logo.png1.79KB0.86KB▼ 52.18%