84% totals-for-sponsorkliks

Code Review | Totals for Sponsorkliks

WordPress plugin Totals for Sponsorkliks scored84%from 54 tests.

About plugin

  • Plugin page: totals-for-sponso...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.3-5.5
  • WordPress version: 6.3.1
  • First release: Sep 16, 2020
  • Latest release: Dec 29, 2020
  • Number of updates: 12
  • Update frequency: every 9.3 days
  • Top authors: DeBoekies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /500 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.27ms] Passed 4 tests

This is a short check of server-side resources used by Totals for Sponsorkliks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.91 ▲1.50
Dashboard /wp-admin3.35 ▲0.0451.04 ▲3.22
Posts /wp-admin/edit.php3.40 ▲0.0448.26 ▼3.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.09 ▲0.41
Media Library /wp-admin/upload.php3.27 ▲0.0439.47 ▲0.65

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_totals_for_sponsorkliks_widget
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Totals for Sponsorkliks: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.061.79 ▼0.1843.40 ▼0.64
Dashboard /wp-admin2,206 ▲185.85 ▲0.98101.45 ▼11.1038.86 ▼2.48
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0040.57 ▲2.5135.75 ▼2.60
Add New Post /wp-admin/post-new.php1,533 ▼023.30 ▲0.02674.28 ▲20.5959.31 ▼5.35
Media Library /wp-admin/upload.php1,391 ▲34.23 ▼0.08110.84 ▲12.3647.09 ▲2.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_totals_for_sponsorkliks_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/totals-for-sponsorkliks/totals-for-sponsorkliks.php

User-side errors Passed 1 test

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

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
3 plugin tags: shortcode, widget, sponsorkliks

totals-for-sponsorkliks/totals-for-sponsorkliks.php Passed 13 tests

The primary PHP file in "Totals for Sponsorkliks" version 0.1.5 is used by WordPress to initiate all plugin functionality
69 characters long description:
This plugin shows you the total commission, earned using SponsorKliks

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
Success! There were no dangerous files found in this plugin163 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13142120
PO File1131443

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
sponsorkliks-logo.png55.48KB23.81KB▼ 57.08%