83% outbound-links-monetization

Code Review | Outbound Links Monetization

WordPress plugin Outbound Links Monetization scored83%from 54 tests.

About plugin

  • Plugin page: outbound-links-mo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Sep 21, 2016
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: zerros24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,018 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.10ms] Passed 4 tests

A check of server-side resources used by Outbound Links Monetization
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.60 ▲2.07
Dashboard /wp-admin3.33 ▲0.0345.95 ▼3.88
Posts /wp-admin/edit.php3.38 ▲0.0350.58 ▲1.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.25 ▼4.20
Media Library /wp-admin/upload.php3.26 ▲0.0335.82 ▲2.25
Links Monetization /wp-admin/options-general.php?page=shortenurl_settings3.2234.13

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: 1 new table, 6 new options
New tables
wp_shorten_urls
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Outbound Links Monetization
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲5814.34 ▼0.011.81 ▲0.3047.09 ▲5.91
Dashboard /wp-admin2,202 ▲255.57 ▼0.1191.00 ▼7.0841.13 ▼4.59
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0539.76 ▲4.9836.04 ▲2.29
Add New Post /wp-admin/post-new.php1,531 ▼422.98 ▲4.83659.96 ▲42.5352.86 ▼12.26
Media Library /wp-admin/upload.php1,404 ▲104.19 ▼0.0394.15 ▼2.7443.14 ▲1.91
Links Monetization /wp-admin/options-general.php?page=shortenurl_settings8271.9929.6743.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/outbound-links-monetization/OutboundLinksMonetization.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (screenshot.png), #2 (banner-772—250.png), #3 (icon-128x128.png), #4 (banner-1544—500.png)
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Donate link: Please fix this invalid url: "NA"
  • Screenshots: Add a description for screenshot #0 in outbound-links-monetization/assets to your readme.txt
The official readme.txt might help

outbound-links-monetization/OutboundLinksMonetization.php 92% from 13 tests

"Outbound Links Monetization" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("outbound-links-monetization.php" instead of "OutboundLinksMonetization.php")

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 detected120 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12016120

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot.png7.82KB4.45KB▼ 43.09%
Screenshot-1.png7.82KB4.45KB▼ 43.09%