78% mediavine-control-panel

Code Review | Mediavine Control Panel

WordPress plugin Mediavine Control Panel scored78%from 54 tests.

About plugin

  • Plugin page: mediavine-control...
  • Plugin version: 2.10.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Dec 19, 2016
  • Latest release: Oct 18, 2023
  • Number of updates: 101
  • Update frequency: every 24.7 days
  • Top authors: mediavine (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10,000+ active /212,829 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.78MB] [CPU: ▲0.86ms] Passed 4 tests

Analyzing server-side resources used by Mediavine Control Panel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.25 ▲0.7956.42 ▲14.39
Dashboard /wp-admin4.07 ▲0.7760.06 ▲5.47
Posts /wp-admin/edit.php4.19 ▲0.8353.94 ▲0.46
Add New Post /wp-admin/post-new.php6.68 ▲0.79101.57 ▼6.71
Media Library /wp-admin/upload.php4.00 ▲0.7744.67 ▲4.23
Mediavine Control Panel /wp-admin/options-general.php?page=mv_control_panel4.0043.01

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 437 new files
Database: no new tables, 9 new options
New WordPress options
mcp_offering_code
widget_recent-posts
mcp_offering_name
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
mcp_version
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Mediavine Control Panel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲7017.58 ▲2.941.87 ▲0.0642.94 ▲1.74
Dashboard /wp-admin2,235 ▲558.81 ▲3.17257.50 ▲166.9839.09 ▼2.76
Posts /wp-admin/edit.php2,155 ▲555.97 ▲3.9264.79 ▲24.0133.37 ▼2.25
Add New Post /wp-admin/post-new.php6,222 ▲4,68821.41 ▼1.85972.10 ▲321.4937.76 ▼22.57
Media Library /wp-admin/upload.php1,452 ▲497.14 ▲2.89121.82 ▲23.3242.25 ▼6.46
Mediavine Control Panel /wp-admin/options-general.php?page=mv_control_panel1,0175.4671.1153.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • mcp_offering_code
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • mcp_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • mcp_offering_name

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 9× PHP files output text when accessed directly:
    • > /wp-content/plugins/mediavine-control-panel/views/settings/video-sitemap.php
    • > /wp-content/plugins/mediavine-control-panel/views/settings.php
    • > /wp-content/plugins/mediavine-control-panel/views/settings/security.php
    • > /wp-content/plugins/mediavine-control-panel/views/settings/adstxt.php
    • > /wp-content/plugins/mediavine-control-panel/mediavine-control-panel.php
    • > /wp-content/plugins/mediavine-control-panel/views/settings/web-stories.php
    • > /wp-content/plugins/mediavine-control-panel/views/settings/launch-mode.php
    • > /wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/grammar/rebuildParsers.php
    • > /wp-content/plugins/mediavine-control-panel/views/settings/gpt.php
  • 294× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\BinaryOp' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\AssignOp' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\BinaryOp' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\AssignOp' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpParser\\Builder' not found in wp-content/plugins/mediavine-control-panel/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php:9

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: mediavine, advertising

mediavine-control-panel/mediavine-control-panel.php 92% from 13 tests

Analyzing the main PHP file in "Mediavine Control Panel" version 2.10.3
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin25,554 lines of code in 375 files:
LanguageFilesBlank linesComment linesLines of code
PHP3564,0657,21922,533
yacc3326122,013
JavaScript35051312
Markdown3830284
CSS2405215
JSON100118
YAML20036
Bourne Again Shell210618
Bourne Shell17013
HTML10011
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.68
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces37
Interfaces11
Traits2
Classes320
▷ Abstract classes216.56%
▷ Concrete classes29993.44%
▷ Final classes144.68%
Methods1,615
▷ Static methods976.01%
▷ Public methods1,21875.42%
▷ Protected methods33120.50%
▷ Private methods664.09%
Functions1,237
▷ Named functions433.48%
▷ Anonymous functions1,19496.52%
Constants233
▷ Global constants52.15%
▷ Class constants22897.85%
▷ Public constants228100.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
No PNG files were detected