78% mm-comment-field-ratings

Code Review | MM Comment Field Ratings

WordPress plugin MM Comment Field Ratings scored78%from 54 tests.

About plugin

  • Plugin page: mm-comment-field-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Jan 26, 2017
  • Latest release: Jan 26, 2017
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: manidipmandal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 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
Installer ran successfully

Server metrics [RAM: ▲0.65MB] [CPU: ▼0.40ms] Passed 4 tests

A check of server-side resources used by MM Comment Field Ratings
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5446.17 ▲6.98
Dashboard /wp-admin4.01 ▲0.7150.26 ▼2.54
Posts /wp-admin/edit.php4.03 ▲0.6750.13 ▼1.33
Add New Post /wp-admin/post-new.php6.61 ▲0.7188.79 ▼4.69
Media Library /wp-admin/upload.php3.93 ▲0.7042.86 ▲7.50
All Ratings Field /wp-admin/edit.php?post_type=mmcfr-ratings3.9845.67
Settings /wp-admin/edit.php?post_type=mmcfr-ratings&page=mmcfr-options3.9136.21

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 394 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
mmcfr-remove-settings
db_upgraded
can_compress_scripts
theysaidso_admin_options
mmcfr-custom-css
widget_recent-comments
widget_theysaidso_widget
mmcfr-show-avg-rating

Browser metrics Passed 4 tests

MM Comment Field Ratings: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲24613.59 ▼0.779.06 ▲7.2843.05 ▼1.81
Dashboard /wp-admin2,246 ▲545.90 ▲0.98101.69 ▼16.9939.17 ▼7.89
Posts /wp-admin/edit.php2,129 ▲372.06 ▲0.0834.31 ▼7.3435.40 ▼12.86
Add New Post /wp-admin/post-new.php1,546 ▲723.34 ▲0.06595.51 ▼97.1547.76 ▼4.99
Media Library /wp-admin/upload.php1,425 ▲374.31 ▲0.12100.63 ▼7.6841.20 ▼9.16
All Ratings Field /wp-admin/edit.php?post_type=mmcfr-ratings1,0932.0033.1131.57
Settings /wp-admin/edit.php?post_type=mmcfr-ratings&page=mmcfr-options1,2602.4640.5042.75

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mm-comment-field-ratings/mm-comment-field-ratings.php
    • > /wp-content/plugins/mm-comment-field-ratings/inc/admin.php
    • > /wp-content/plugins/mm-comment-field-ratings/inc/user.php
    • > /wp-content/plugins/mm-comment-field-ratings/inc/metaboxes.php
  • 37× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_Title.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/CMB2.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/mm-comment-field-ratings/assets/cmb2/includes/types/CMB2_Type_File.php:13

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "#"
You can take inspiration from this readme.txt

mm-comment-field-ratings/mm-comment-field-ratings.php 92% from 13 tests

This is the main PHP file of "MM Comment Field Ratings" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 167 characters long)

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
There were no executable files found in this plugin53,042 lines of code in 229 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78217,88231,544
JavaScript107947507,224
PHP581,9834,8526,818
CSS251,0481,0665,181
Sass13238251,154
SVG100685
Markdown21470436

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.47
Average class complexity17.19
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes811.59%
▷ Concrete classes6188.41%
▷ Final classes00.00%
Methods475
▷ Static methods7114.95%
▷ Public methods39783.58%
▷ Protected methods7515.79%
▷ Private methods30.63%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants1768.00%
▷ Class constants832.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 0.14MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fontawesome-stars.png3.68KB2.21KB▼ 39.93%
screenshot-3.png15.65KB5.21KB▼ 66.71%
images/bars-pill.png2.65KB1.94KB▼ 26.82%
assets/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
images/bars-1to10.png1.08KB0.63KB▼ 41.14%