79% monetizer

Code Review | Monetizer

WordPress plugin Monetizer scored79%from 54 tests.

About plugin

  • Plugin page: monetizer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 16, 2022
  • Latest release: Sep 22, 2022
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: monetizerdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /322 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
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼1.10ms] Passed 4 tests

An overview of server-side resources used by Monetizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3144.78 ▲7.24
Dashboard /wp-admin3.61 ▲0.2743.25 ▼13.11
Posts /wp-admin/edit.php3.66 ▲0.3148.27 ▲5.77
Add New Post /wp-admin/post-new.php6.15 ▲0.2798.09 ▼0.79
Media Library /wp-admin/upload.php3.47 ▲0.2535.99 ▲3.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Monetizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7514.46 ▲0.091.72 ▲0.0844.76 ▲4.07
Dashboard /wp-admin2,228 ▲365.80 ▲0.83105.60 ▼5.9680.42 ▲36.42
Posts /wp-admin/edit.php2,114 ▲252.02 ▲0.0037.64 ▲0.6334.62 ▼2.21
Add New Post /wp-admin/post-new.php1,385 ▼14818.87 ▼4.47605.97 ▼23.7152.45 ▼2.44
Media Library /wp-admin/upload.php1,401 ▲134.26 ▲0.06104.02 ▲3.6687.40 ▲43.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/monetizer/public/partials/monetizer-public-display.php
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function describe() in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/spec/selector.spec.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function describe() in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/spec/tree.spec.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function describe() in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/spec/selfclosing.spec.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function describe() in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/spec/filter.spec.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function describe() in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/spec/search.spec.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/monetizer/admin/partials/monetizer-admin-settings-page.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function describe() in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/spec/simple.spec.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'html_changer\\HtmlPart' not found in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/src/OpeningTag.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'html_changer\\HtmlPart' not found in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/src/Text.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function describe() in wp-content/plugins/monetizer/vendor/friedolinfoerder/html-changer/spec/attributes.spec.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: push, traffic monetization, ads, monetization, advertizing...

monetizer/monetizer.php Passed 13 tests

The entry point to "Monetizer" version 1.0.0 is a PHP file that has certain tags in its header comment area
56 characters long description:
Monetize your site with Monetizer monetization platform.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,012 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP325479592,795
JavaScript213185
JSON40083
Markdown18040
CSS2369

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity21.69
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods155
▷ Static methods74.52%
▷ Public methods11473.55%
▷ Protected methods00.00%
▷ Private methods4126.45%
Functions91
▷ Named functions66.59%
▷ Anonymous functions8593.41%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/monetizer-icon.png0.87KB0.71KB▼ 17.81%