83% monetag-official

Code Review | Monetag Official Plugin

WordPress plugin Monetag Official Plugin scored83%from 54 tests.

About plugin

  • Plugin page: monetag-official
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 16, 2022
  • Latest release: Aug 14, 2023
  • Number of updates: 12
  • Update frequency: every 20.3 days
  • Top authors: monetagwp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

3,000+ active /24,150 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼3.13ms] Passed 4 tests

Server-side resources used by Monetag Official Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2945.86 ▲4.85
Dashboard /wp-admin3.58 ▲0.2453.70 ▼7.61
Posts /wp-admin/edit.php3.63 ▲0.2849.38 ▲10.36
Add New Post /wp-admin/post-new.php6.12 ▲0.2384.89 ▼15.19
Media Library /wp-admin/upload.php3.44 ▲0.2241.65 ▲5.43

Server storage [IO: ▲0.19MB] [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: 46 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
monetag_zones_last_update_time
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Monetag Official Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲15213.63 ▼1.193.95 ▲1.9842.33 ▼0.81
Dashboard /wp-admin2,329 ▲1385.84 ▼0.01110.01 ▲2.6141.24 ▼3.61
Posts /wp-admin/edit.php2,212 ▲1202.02 ▼0.0335.69 ▼5.4332.80 ▼3.85
Add New Post /wp-admin/post-new.php1,703 ▲17422.42 ▲4.22594.47 ▼55.2527.43 ▼23.43
Media Library /wp-admin/upload.php1,508 ▲1174.15 ▼0.07102.16 ▲5.8044.03 ▲1.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Ads_Admin' not found in wp-content/plugins/monetag-official/admin/partials/ads-admin-footer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/monetag-official/admin/partials/ads-admin-connect.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/monetag-official/admin/partials/ads-admin-script.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/monetag-official/admin/partials/ads-admin-modal.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/monetag-official/admin/partials/ads-admin.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/monetag-official/admin/partials/ads-admin-formats.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/monetag-official/admin/partials/ads-admin-verify.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Screenshots: Add descriptions for screenshots #2, #3, #4, #5 in monetag-official/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can take inspiration from this readme.txt

monetag-official/ads.php 85% from 13 tests

"Monetag Official Plugin" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("monetag-official.php" instead of "ads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,129 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP243965961,684
CSS1720430
XML18815

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.31
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods112
▷ Static methods32.68%
▷ Public methods8777.68%
▷ Protected methods21.79%
▷ Private methods2320.54%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants40
▷ Global constants00.00%
▷ Class constants40100.00%
▷ Public constants40100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon-plus.png0.23KB0.17KB▼ 23.83%
admin/img/icon.png0.83KB0.48KB▼ 42.79%
admin/img/format-onclick.png18.94KB9.95KB▼ 47.47%
admin/img/icon-profile.png0.88KB0.51KB▼ 41.60%
admin/img/icon-checked.png0.53KB0.31KB▼ 42.60%