72% the-moneytizer

Code Review | The Moneytizer

WordPress plugin The Moneytizer scored72%from 54 tests.

About plugin

  • Plugin page: the-moneytizer
  • Plugin version: 9.5.20
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Aug 9, 2023
  • Number of updates: 2,009
  • Update frequency: every 1.4 days
  • Top authors: lvaudore (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

2,000+ active /84,382 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▲199.39ms] Passed 4 tests

A check of server-side resources used by The Moneytizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5145.44 ▲2.84
Dashboard /wp-admin3.85 ▲0.50352.14 ▲290.77
Posts /wp-admin/edit.php3.91 ▲0.55328.42 ▲271.63
Add New Post /wp-admin/post-new.php5.96 ▲0.07371.12 ▲271.14
Media Library /wp-admin/upload.php3.71 ▲0.48289.78 ▲251.96
The Moneytizer /wp-admin/options-general.php?page=themoneytizer3.72287.84

Server storage [IO: ▲36.48MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Try to limit filesystem usage to 25MB (currently using 36.48MB)
Filesystem: 120 new files
Database: no new tables, 18 new options
New WordPress options
themoneytizer_plugin_version
themoneytizer_data_lazy
widget_recent-comments
theysaidso_admin_options
widget_themoneytizer_widget
themoneytizer_user_notifications
themoneytizer_user_language
themoneytizer_setting_fix_46
themoneytizer_setting_init
themoneytizer_data_statistics
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Moneytizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲18013.51 ▼0.768.40 ▲6.7438.59 ▼6.03
Dashboard /wp-admin2,248 ▲715.61 ▲0.0885.74 ▼6.9441.21 ▼2.58
Posts /wp-admin/edit.php2,148 ▲482.01 ▲0.0037.23 ▼1.8934.92 ▼0.85
Add New Post /wp-admin/post-new.php1,580 ▲5223.19 ▲0.06668.47 ▲6.1770.85 ▲16.37
Media Library /wp-admin/upload.php1,517 ▲1174.30 ▲0.11100.30 ▼1.8446.12 ▼1.05
The Moneytizer /wp-admin/options-general.php?page=themoneytizer1,5267.8193.3185.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • count_call
    • widget_themoneytizer_widget
    • themoneytizer_user_local_lang
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • themoneytizer_data_language
    • themoneytizer_setting_fix_46
    • db_upgraded
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=themoneytizer
    • > Notice in wp-content/plugins/the-moneytizer/themoneytizer-shortcode.php+57
    Trying to get property 'site_tags' of non-object
    • > GET request to /wp-admin/options-general.php?page=themoneytizer
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/the-moneytizer/core/core_statistics.php+4
    Trying to get property 'validity' of non-object

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 take a closer look at the following
  • 75× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-moneytizer/core/core_cmp.php:251
    • > PHP Notice
      Undefined variable: ad_align in wp-content/plugins/the-moneytizer/core/inc/inc_lazy_template.php on line 62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/the-moneytizer/tab/tab_menu_faq.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/the-moneytizer/tab/tab_menu_settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/the-moneytizer/tab/tab_menu_tags.php:5
    • > PHP Notice
      Undefined variable: ad_id in wp-content/plugins/the-moneytizer/core/inc/inc_lazy_template.php on line 37
    • > PHP Notice
      Undefined variable: ad_id in wp-content/plugins/the-moneytizer/core/inc/inc_lazy_template.php on line 56
    • > PHP Notice
      Undefined variable: ad_id in wp-content/plugins/the-moneytizer/core/inc/inc_lazy_template.php on line 57
    • > PHP Notice
      Undefined variable: ad_id in wp-content/plugins/the-moneytizer/core/inc/inc_lazy_template.php on line 61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/the-moneytizer/core/core_update_informations.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=themoneytizer
    • > Network (severe)
    https://unpkg.com/driver.js@1.3.0/dist/driver.min.css - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/options-general.php?page=themoneytizer
    • > Network (severe)
    https://unpkg.com/driver.js@1.3.0/dist/driver.min.js - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/options-general.php?page=themoneytizer
    • > Javascript (severe) in unknown
    /wp-content/plugins/the-moneytizer/js/intro-languages/US_script_intro_js.js?ver=2 15:15 Uncaught ReferenceError: Driver is not defined
    • > GET request to /wp-admin/options-general.php?page=themoneytizer
    • > Javascript (severe) in unknown
    /wp-content/plugins/the-moneytizer/js/script_intro_js.js?ver=2 0:0 Uncaught ReferenceError: driver is not defined
    • > GET request to /wp-admin/options-general.php?page=themoneytizer
    • > Javascript (severe) in unknown
    https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.bundle.js?ver=6.3.1 7759:18 Uncaught TypeError: Cannot read properties of null (reading 'length')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

the-moneytizer/themoneytizer.php 92% from 13 tests

The main PHP file in "The Moneytizer" ver. 9.5.20 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("the-moneytizer.php" instead of "themoneytizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin12,233 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PO File72,6955,0425,163
PHP393172203,408
JavaScript21180843,021
CSS11432641

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.50
▷ Minimum class complexity9.00
▷ Maximum class complexity24.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods969.23%
▷ Protected methods00.00%
▷ Private methods430.77%
Functions52
▷ Named functions5198.08%
▷ Anonymous functions11.92%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
31 PNG files occupy 0.93MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png72.32KB28.87KB▼ 60.08%
assets/format_6.png3.86KB2.15KB▼ 44.25%
assets/format_30.png7.58KB3.91KB▼ 48.37%
assets/footer.png3.21KB2.25KB▼ 29.96%
assets/format_5.png2.37KB1.87KB▼ 21.19%