68% partners-banners

Code Review | Zedna Partners Banners

WordPress plugin Zedna Partners Banners scored68%from 54 tests.

About plugin

  • Plugin page: partners-banners
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.1-5.4
  • WordPress version: 6.3.1
  • First release: Sep 2, 2015
  • Latest release: Mar 12, 2020
  • Number of updates: 46
  • Update frequency: every 35.9 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,581 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.56MB] [CPU: ▼12.81ms] Passed 4 tests

Analyzing server-side resources used by Zedna Partners Banners
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1547.40 ▲8.19
Dashboard /wp-admin3.49 ▲0.1574.20 ▲16.13
Posts /wp-admin/edit.php3.50 ▲0.1446.16 ▲3.90
Add New Post /wp-admin/post-new.php3.26 ▼2.6236.76 ▼68.74
Media Library /wp-admin/upload.php3.33 ▲0.1138.09 ▲5.40
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=partnersbanner3.3346.72
Partner banners /wp-admin/edit.php?post_type=partnersbanner3.3938.90
Add New /wp-admin/post-new.php?post_type=partnersbanner3.2634.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_widget-partners-banners
category_children
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Zedna Partners Banners
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11313.15 ▼1.592.12 ▲0.4443.00 ▲0.38
Dashboard /wp-admin2,237 ▲494.86 ▼0.06109.57 ▼3.3338.42 ▲1.64
Posts /wp-admin/edit.php2,132 ▲432.00 ▲0.0139.16 ▼1.1936.02 ▼1.25
Add New Post /wp-admin/post-new.php1,545 ▲123.25 ▲4.89680.34 ▲66.4050.36 ▼1.17
Media Library /wp-admin/upload.php1,416 ▲284.16 ▼0.0493.02 ▼10.4443.34 ▲0.04
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=partnersbanner1,4712.1527.3031.48
Partner banners /wp-admin/edit.php?post_type=partnersbanner1,1211.9632.8028.71
Add New /wp-admin/post-new.php?post_type=partnersbanner1,9124.0068.8338.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method partners_banners_widgets::uninstall() should not be called statically
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • category_children
    • theysaidso_admin_options
    • widget_widget-partners-banners
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=partnersbanner
    • > Notice in wp-content/plugins/partners-banners/partners-banners.php+124
    Undefined index: partner_meta_box_nonce
    • > GET request to /wp-admin/post-new.php?post_type=partnersbanner
    • > Notice in wp-content/plugins/partners-banners/partners-banners.php+197
    Undefined variable: post
    • > GET request to /wp-admin/post-new.php?post_type=partnersbanner
    • > Notice in wp-content/plugins/partners-banners/partners-banners.php+197
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=partnersbanner
    • > User notice in wp-includes/functions.php+5905
    Function map_meta_cap was called incorrectly. When checking for the edit_post capability, you must always check it against a specific post. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/partners-banners/partners-banners.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/partners-banners/templates/partners-banners-layout.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/partners-banners/inc/widget-partners-banners.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: link, ads, partners, banners, logo

partners-banners/partners-banners.php Passed 13 tests

The main PHP file in "Zedna Partners Banners" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
Display partners banners in widget

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin533 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4131149452
PO File136081

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.33
▷ Minimum class complexity2.00
▷ Maximum class complexity18.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin