74% partners-dynamic-badge

Code Review | Partners Dynamic Badge

WordPress plugin Partners Dynamic Badge scored74%from 54 tests.

About plugin

  • Plugin page: partners-dynamic-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.8
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Apr 4, 2017
  • Number of updates: 14
  • Update frequency: every 5.1 days
  • Top authors: quickwin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,074 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼40.04ms] Passed 4 tests

Server-side resources used by Partners Dynamic Badge
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.31 ▼14.73
Dashboard /wp-admin3.00 ▼0.3123.05 ▼35.75
Posts /wp-admin/edit.php3.00 ▼0.3624.32 ▼28.31
Add New Post /wp-admin/post-new.php3.00 ▼2.8921.57 ▼81.37
Media Library /wp-admin/upload.php3.00 ▼0.2322.82 ▼13.10
Partners Dynamic Badge /wp-admin/options-general.php?page=GPDB3.0022.89

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Partners Dynamic Badge: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.27 ▲0.071.96 ▲0.2741.78 ▼2.19
Dashboard /wp-admin2,201 ▲215.58 ▼0.2794.81 ▼1.1345.49 ▲1.32
Posts /wp-admin/edit.php2,106 ▲61.99 ▲0.0241.13 ▲4.7538.90 ▲0.40
Add New Post /wp-admin/post-new.php1,531 ▲223.24 ▲0.13620.09 ▼62.8160.81 ▼0.50
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0898.58 ▼7.8442.54 ▲0.72
Partners Dynamic Badge /wp-admin/options-general.php?page=GPDB7961.9926.2332.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=GPDB
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=GPDB
    • > Notice in wp-content/plugins/partners-dynamic-badge/settings.php+34
    Undefined variable: result

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: google, badge, adwords, partners

partners-dynamic-badge/GPDB.php 92% from 13 tests

"Partners Dynamic Badge" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("partners-dynamic-badge.php" instead of "GPDB.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin115 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP440590
CSS12025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
PNG images were not found in this plugin