84% monetize-me

Code Review | Monetize Me

WordPress plugin Monetize Me scored 84% from 54 tests.

About plugin

  • Plugin page: monetize-me
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Aug 7, 2017
  • Latest release: Dec 3, 2019
  • Number of updates: 27
  • Update frequency: every 31.4 days
  • Top authors: shahalom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 828 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲0.73ms] Passed 4 tests

A check of server-side resources used by Monetize Me
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.65 ▲4.83
Dashboard /wp-admin3.39 ▲0.0951.54 ▲2.19
Posts /wp-admin/edit.php3.49 ▲0.1354.26 ▲7.30
Add New Post /wp-admin/post-new.php6.03 ▲0.1590.20 ▼7.69
Media Library /wp-admin/upload.php3.32 ▲0.0941.20 ▲3.57
Ads /wp-admin/edit.php?post_type=ad3.3440.67
New item /wp-admin/post-new.php?post_type=ad3.4053.90
Ad Sponsor /wp-admin/edit-tags.php?taxonomy=adsponsor&post_type=ad3.3141.69
Ad Category /wp-admin/edit-tags.php?taxonomy=adcategory&post_type=ad3.3137.56

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_monetize-me

Browser metrics Passed 4 tests

This is an overview of browser requirements for Monetize Me
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11313.67 ▼0.711.79 ▲0.0241.02 ▼4.77
Dashboard /wp-admin2,241 ▲535.84 ▲0.97100.79 ▼14.6737.81 ▼9.86
Posts /wp-admin/edit.php2,127 ▲382.03 ▲0.0242.42 ▲4.6937.27 ▲5.75
Add New Post /wp-admin/post-new.php1,544 ▲1123.38 ▼0.00658.87 ▼22.0061.35 ▼2.60
Media Library /wp-admin/upload.php1,423 ▲354.18 ▼0.0396.78 ▼22.3644.32 ▼2.69
Ads /wp-admin/edit.php?post_type=ad1,1041.9431.4530.83
New item /wp-admin/post-new.php?post_type=ad2,1274.2881.5451.25
Ad Sponsor /wp-admin/edit-tags.php?taxonomy=adsponsor&post_type=ad1,2692.1426.4127.40
Ad Category /wp-admin/edit-tags.php?taxonomy=adcategory&post_type=ad1,2722.1426.1827.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_monetize-me
    • widget_recent-posts
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetize-me/inc/custom-taxonomies/adcategory.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/monetize-me/libs/widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/monetize-me/inc/shortcodes.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetize-me/inc/custom-taxonomies/adsponsor.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetize-me/inc/widgets.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetize-me/inc/custom-post-types/ad.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #7 is missing in monetize-me/assets to your readme.txt
Please take inspiration from this readme.txt

monetize-me/main.php 92% from 13 tests

The primary PHP file in "Monetize Me" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("monetize-me.php" instead of "main.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
Success! There were no dangerous files found in this plugin773 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP11167153589
JavaScript42048112
Sass316059
JSON10012
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected