10% monetize-wp

Code Review | Monetize WP

WordPress plugin Monetize WP scored 10% from 54 tests.

About plugin

  • Plugin page: monetize-wp
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-5.1
  • WordPress version: 5.8.1
  • First release: Dec 16, 2018
  • Latest release: Mar 2, 2019
  • Number of updates: 20
  • Update frequency: every 3.8 days
  • Top authors: second2none (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 1,651 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/monetize-wp/wordpress-money.php+17
    Function create_function() is deprecated

Server metrics [RAM: ▼1.88MB] [CPU: ▼185.43ms] Passed 4 tests

This is a short check of server-side resources used by Monetize WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.75 ▼1.088.79 ▼23.86
Dashboard /wp-admin1.77 ▼1.285.49 ▼36.66
Posts /wp-admin/edit.php1.77 ▼1.345.41 ▼33.28
Add New Post /wp-admin/post-new.php1.77 ▼3.665.15 ▼645.32
Media Library /wp-admin/upload.php1.77 ▼1.235.26 ▼26.47

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 4 new options
New WordPress options
widget_monetize_wordpress_solvemedia_unlock
widget_monetize_wordpress_solvemedia_unlock_custom
widget_monetize_wordpress_custom_ads_widget
monetize_wordpress_installed

Browser metrics Passed 4 tests

An overview of browser requirements for Monetize WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲13115.96 ▲0.438.94 ▲0.3344.64 ▼2.17
Dashboard /wp-admin2,992 ▲616.08 ▼0.09137.71 ▼5.14109.61 ▼7.63
Posts /wp-admin/edit.php2,759 ▲202.69 ▲0.0163.33 ▼2.1689.81 ▲2.77
Add New Post /wp-admin/post-new.php1,885 ▲21319.24 ▲0.39370.08 ▲10.60105.33 ▼2.33
Media Library /wp-admin/upload.php1,833 ▲295.01 ▲0.00143.77 ▲10.30116.18 ▲0.66

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
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/monetize-wp/wordpress-money.php+17
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 4 options
    • widget_monetize_wordpress_solvemedia_unlock_custom
    • widget_monetize_wordpress_solvemedia_unlock
    • widget_monetize_wordpress_custom_ads_widget
    • monetize_wordpress_installed

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/monetize-wp/php_libraries/solvemedialib.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/monetize-wp/options.php:1187
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/monetize-wp/wordpress-money-custom-ads-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/monetize-wp/wordpress-money-solvemedia-fullpage-locker-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/monetize-wp/wordpress-money-solvemedia-custom-locker-widget.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
The official readme.txt is a good inspiration

monetize-wp/wordpress-money.php 92% from 13 tests

This is the main PHP file of "Monetize WP" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("monetize-wp.php" instead of "wordpress-money.php")

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
No dangerous file extensions were detected2,448 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP61291402,180
JavaScript560159
CSS310109

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.44
Average class complexity18.00
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity5.70
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions4894.12%
▷ Anonymous functions35.88%
Constants4
▷ Global constants4100.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
11 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assests/screenshot-2.png38.56KB16.50KB▼ 57.22%
assests/banner-772x250.png15.24KB5.42KB▼ 64.43%
assests/screenshot-6.png23.41KB9.61KB▼ 58.95%
assests/screenshot-1.png68.63KB30.57KB▼ 55.46%
assests/screenshot-3.png70.11KB29.23KB▼ 58.31%