68% website-monetization-by-magenet

Code Review | Website Monetization by MageNet

WordPress plugin Website Monetization by MageNet scored68%from 54 tests.

About plugin

  • Plugin page: website-monetizat...
  • Plugin version: 1.0.29.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 1, 2013
  • Latest release: Jul 27, 2023
  • Number of updates: 88
  • Update frequency: every 40.4 days
  • Top authors: MageNet (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

30,000+ active /198,403 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.01ms] Passed 4 tests

An overview of server-side resources used by Website Monetization by MageNet
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1638.47 ▼10.87
Dashboard /wp-admin3.43 ▲0.1349.45 ▼9.17
Posts /wp-admin/edit.php3.55 ▲0.1950.28 ▲2.09
Add New Post /wp-admin/post-new.php6.03 ▲0.1492.57 ▲2.95
Media Library /wp-admin/upload.php3.35 ▲0.1339.23 ▲1.92
Website Monetization by MageNet /wp-admin/options-general.php?page=magenet-links-settings3.34126.45

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_magenet_links
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Website Monetization by MageNet: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.55 ▼1.051.66 ▼0.4046.28 ▲1.61
Dashboard /wp-admin2,251 ▲605.26 ▲0.35117.14 ▲7.9839.81 ▼1.89
Posts /wp-admin/edit.php2,099 ▲102.36 ▲0.3141.34 ▲4.5633.84 ▲0.59
Add New Post /wp-admin/post-new.php1,517 ▲317.76 ▲0.27637.39 ▲25.5940.86 ▼6.58
Media Library /wp-admin/upload.php1,390 ▲24.48 ▲0.27111.47 ▲5.5448.02 ▲3.97
Website Monetization by MageNet /wp-admin/options-general.php?page=magenet-links-settings8142.0032.3028.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/website-monetization-by-magenet/uninstall.php+6
    Constant plugin_file already defined
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/website-monetization-by-magenet/monetization-by-magenet.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/website-monetization-by-magenet/MagenetLinkAutoinstall.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/website-monetization-by-magenet/MagenetLinkAutoinstall.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/website-monetization-by-magenet/MagenetLinkAutoinstall.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/website-monetization-by-magenet/view-settings.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: sell ads, contextual ads, earn money online, advertising, contextual advertising...

website-monetization-by-magenet/monetization-by-magenet.php 85% from 13 tests

The primary PHP file in "Website Monetization by MageNet" version 1.0.29.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("website-monetization-by-magenet.php" instead of "monetization-by-magenet.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 395 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,365 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP52593661,171
CSS1153146
JavaScript111048

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity42.20
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity6.18
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions950.00%
▷ Anonymous functions950.00%
Constants11
▷ Global constants11100.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
No PNG files were detected