61% mg-post-contributors

Code Review | MG Post Contributors

WordPress plugin MG Post Contributors scored61%from 54 tests.

About plugin

  • Plugin page: mg-post-contributors
  • Plugin version: 1.3....
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2014
  • Latest release: Feb 13, 2015
  • Number of updates: 80
  • Update frequency: every 4.3 days
  • Top authors: Mahesh901122 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,137 total downloads

Benchmarks

Plugin footprint 65% 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.59MB] [CPU: ▼47.84ms] Passed 4 tests

Server-side resources used by MG Post Contributors
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0516.36 ▼29.82
Dashboard /wp-admin3.43 ▲0.0919.49 ▼46.02
Posts /wp-admin/edit.php3.43 ▲0.0724.12 ▼32.81
Add New Post /wp-admin/post-new.php3.43 ▼2.4620.38 ▼82.72
Media Library /wp-admin/upload.php3.43 ▲0.2017.44 ▼17.58
Structure /wp-admin/admin.php?page=mgpc_options&tab=33.4324.30
Import / Export /wp-admin/admin.php?page=mgpc_options&tab=123.4318.49
Styling /wp-admin/admin.php?page=mgpc_options&tab=63.4317.74
Our Plugins /wp-admin/admin.php?page=mgpc_options&tab=113.4319.05
Basic /wp-admin/admin.php?page=mgpc_options&tab=03.4325.64
Advanced Options /wp-admin/admin.php?page=mgpc_options&tab=103.4324.80

Server storage [IO: ▲8.81MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 505 new files
Database: no new tables, 9 new options
New WordPress options
redux-framework-tracking
mgpc-transients
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
mgpc

Browser metrics Passed 4 tests

A check of browser resources used by MG Post Contributors
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15214.71 ▲0.362.40 ▲0.6942.93 ▼1.47
Dashboard /wp-admin2,272 ▲925.53 ▼0.0586.23 ▼6.2442.20 ▼2.37
Posts /wp-admin/edit.php2,188 ▲882.23 ▲0.2233.28 ▼10.0940.27 ▲3.80
Add New Post /wp-admin/post-new.php6,311 ▲4,78218.73 ▼4.71929.03 ▲318.0374.35 ▲19.70
Media Library /wp-admin/upload.php1,481 ▲784.35 ▲0.1796.85 ▼7.6445.69 ▲4.12
Structure /wp-admin/admin.php?page=mgpc_options&tab=35,8446.08127.23147.30
Import / Export /wp-admin/admin.php?page=mgpc_options&tab=125,8186.09114.85110.92
Styling /wp-admin/admin.php?page=mgpc_options&tab=65,8476.07102.88121.73
Our Plugins /wp-admin/admin.php?page=mgpc_options&tab=115,8395.91111.94106.11
Basic /wp-admin/admin.php?page=mgpc_options&tab=05,8446.01110.11119.87
Advanced Options /wp-admin/admin.php?page=mgpc_options&tab=106,0627.24190.41182.93

Uninstaller [IO: ▲0.16MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/mg-post-contributors/framework/core/extensions/customizer/extension_customizer.php+358
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • can_compress_scripts
    • mgpc
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • mgpc-transients
    • theysaidso_admin_options
    • redux-framework-tracking
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgpc_options&tab=10
    • > Warning in wp-content/plugins/mg-post-contributors/framework/core/extensions/customizer/extension_customizer.php+442
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • 2196 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mgpc_options&tab=10
    • > Notice in wp-content/plugins/mg-post-contributors/framework/core/inc/scssphp/src/Compiler.php+2077
    Trying to access array offset on value of type null

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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mg-post-contributors/framework/core/inc/p.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-post-contributors/framework/core/extensions/customizer/extension_customizer.php on line 358
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mg-post-contributors/framework/loader.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mg-post-contributors/admin/actions.php:3
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-post-contributors/framework/core/extensions/customizer/extension_customizer.php on line 442
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mg-post-contributors/admin/user_profile.php:10
    • > PHP Notice
      Undefined variable: header in wp-content/plugins/mg-post-contributors/framework/core/inc/p.php on line 219
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/mg-post-contributors/framework/core/inc/scssphp/src/Formatter/Compact.php:22
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/mg-post-contributors/framework/core/extensions/customizer/extension_customizer.php on line 423
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Formatter' not found in wp-content/plugins/mg-post-contributors/framework/core/inc/scssphp/src/Formatter/Expanded.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Leafo\\ScssPhp\\Compiler' not found in wp-content/plugins/mg-post-contributors/framework/core/inc/scssphp/classmap.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #10, #6, #7, #8, #9 in mg-post-contributors/assets to your readme.txt
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

mg-post-contributors/mg-post-contributors.php 85% from 13 tests

The main PHP file in "MG Post Contributors" ver. 1.3.... adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "1.3....")
  • Description: The description should be shorter than 140 characters (currently 193 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin51,250 lines of code in 376 files:
LanguageFilesBlank linesComment linesLines of code
PHP954,6056,42917,308
JavaScript1613,0252,24114,282
JSON2004,963
Sass34671374,811
CSS493401814,696
LESS293441373,677
SVG200829
PO File1223293544
Markdown238085
Bourne Shell124055

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity39.44
▷ Minimum class complexity1.00
▷ Maximum class complexity829.00
Average method complexity6.24
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes89
▷ Abstract classes11.12%
▷ Concrete classes8898.88%
▷ Final classes00.00%
Methods652
▷ Static methods345.21%
▷ Public methods39360.28%
▷ Protected methods22734.82%
▷ Private methods324.91%
Functions36
▷ Named functions3597.22%
▷ Anonymous functions12.78%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
66 PNG files occupy 1.19MB with 0.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/intro-mg-post-contributors.png11.43KB5.19KB▼ 54.63%
images/help-exclude-roles.png34.40KB16.00KB▼ 53.47%
images/help-structure-settings.png26.21KB12.50KB▼ 52.29%
images/view-verticle-200.png5.67KB3.07KB▼ 45.91%
framework/core/assets/img/2-col-portfolio.png1.02KB0.15KB▼ 85.07%