83% affiliatewp-leaderboard

Code Review | AffiliateWP - Leaderboard

WordPress plugin AffiliateWP - Leaderboard scored 83% from 54 tests.

About plugin

  • Plugin page: affiliatewp-leade...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Dec 30, 2014
  • Latest release: Jun 3, 2022
  • Number of updates: 17
  • Update frequency: every 159.5 days
  • Top authors: sumobi (47.06%)DrewAPicture (29.41%)dbeja (29.41%)tubiz (11.76%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 15,455 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.45ms] Passed 4 tests

This is a short check of server-side resources used by AffiliateWP - Leaderboard
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.42 ▼4.23
Dashboard /wp-admin3.36 ▲0.0644.51 ▼5.37
Posts /wp-admin/edit.php3.47 ▲0.1247.04 ▲0.81
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.84 ▼9.02
Media Library /wp-admin/upload.php3.28 ▲0.0537.69 ▲2.26

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for AffiliateWP - Leaderboard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.24 ▼1.141.76 ▼0.0540.20 ▼3.88
Dashboard /wp-admin2,209 ▲355.82 ▲0.93101.08 ▼17.0039.96 ▼9.26
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0234.55 ▼2.0032.34 ▼1.28
Add New Post /wp-admin/post-new.php1,537 ▲1823.23 ▼0.21663.05 ▼17.5450.91 ▼3.75
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.1393.71 ▼15.5940.72 ▼6.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/affiliatewp-leaderboard/includes/class-widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #2, #3 in affiliatewp-leaderboard/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

affiliatewp-leaderboard/affiliatewp-leaderboard.php 85% from 13 tests

"AffiliateWP - Leaderboard" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

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
Everything looks great! No dangerous files found in this plugin876 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP82781,020821
PO File1181855

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity12.86
▷ Minimum class complexity5.00
▷ Maximum class complexity32.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes228.57%
▷ Concrete classes571.43%
▷ Final classes120.00%
Methods79
▷ Static methods11.27%
▷ Public methods4050.63%
▷ Protected methods2227.85%
▷ Private methods1721.52%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin