83% monetize-link

Code Review | Takeads

WordPress plugin Takeads scored83%from 54 tests.

About plugin

  • Plugin page: monetize-link
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Aug 8, 2023
  • Number of updates: 14
  • Update frequency: every 11.4 days
  • Top authors: takeads (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /840 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲1.00ms] Passed 4 tests

Analyzing server-side resources used by Takeads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.92 ▲2.23
Dashboard /wp-admin3.44 ▲0.1448.78 ▲2.68
Posts /wp-admin/edit.php3.55 ▲0.2049.32 ▲4.04
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.09 ▼4.94
Media Library /wp-admin/upload.php3.36 ▲0.1339.97 ▲5.18
MonetizeLink settings /wp-admin/options-general.php?page=monetizelink-setting3.3334.27

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Takeads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.61 ▼0.751.72 ▲0.0443.22 ▲0.38
Dashboard /wp-admin2,230 ▲425.83 ▲0.89100.65 ▼4.8341.20 ▼0.88
Posts /wp-admin/edit.php2,098 ▲92.03 ▼0.0136.86 ▼0.1435.62 ▲3.79
Add New Post /wp-admin/post-new.php1,563 ▲3018.16 ▼4.95622.24 ▼79.5451.09 ▼4.96
Media Library /wp-admin/upload.php1,415 ▲244.30 ▲0.0796.94 ▼5.7143.77 ▲0.44
MonetizeLink settings /wp-admin/options-general.php?page=monetizelink-setting8892.0525.0027.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'MonetizeLinkPlugin\\MLP_Base' not found in wp-content/plugins/monetize-link/src/MLP_Ajax.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MonetizeLinkPlugin\\MLP_Base' not found in wp-content/plugins/monetize-link/src/MLP_Settings.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MonetizeLinkPlugin\\MLP_Base' not found in wp-content/plugins/monetize-link/src/MLP_Config.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MonetizeLinkPlugin\\MLP_Base' not found in wp-content/plugins/monetize-link/src/MLP_Assets.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MonetizeLinkPlugin\\MLP_Base' not found in wp-content/plugins/monetize-link/src/MLP_Front.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'MonetizeLinkPlugin\\MLP_Base' not found in wp-content/plugins/monetize-link/src/MLP_Popup.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in monetize-link/assets to your readme.txt
Please take inspiration from this readme.txt

monetize-link/monetizelink-plugin.php 85% from 13 tests

The main file in "Takeads" v. 1.0.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("monetize-link.php" instead of "monetizelink-plugin.php")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,135 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP19273187919
CSS134122
JavaScript16054
JSON20022
SVG10018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.36
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods63
▷ Static methods2031.75%
▷ Public methods6196.83%
▷ Protected methods00.00%
▷ Private methods23.17%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.86MB with 0.39MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner.png439.63KB224.69KB▼ 48.89%
assets/icon-128x128.png1.68KB1.03KB▼ 38.84%
assets/banner-1544x500.png439.63KB224.69KB▼ 48.89%