10% mycommentauthors

Code Review | MyCommentAuthors

WordPress plugin MyCommentAuthors scored10%from 54 tests.

About plugin

  • Plugin page: mycommentauthors
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2014
  • Latest release: Feb 1, 2020
  • Number of updates: 74
  • Update frequency: every 27.1 days
  • Top authors: emuki (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,804 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/mycommentauthors/mycommentauthors.php+149
    Methods with the same name as their class will not be constructors in a future version of PHP; MyCommentAuthors has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼54.55ms] Passed 4 tests

An overview of server-side resources used by MyCommentAuthors
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.355.15 ▼34.83
Dashboard /wp-admin2.13 ▼1.175.85 ▼39.16
Posts /wp-admin/edit.php2.13 ▼1.226.42 ▼44.77
Add New Post /wp-admin/post-new.php2.13 ▼3.756.30 ▼99.43
Media Library /wp-admin/upload.php2.13 ▼1.106.26 ▼24.21
MyCommentAuthors /wp-admin/options-general.php?page=mycommentauthors2.135.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 15 new options
New WordPress options
widget_mycommentauthors
mca_gravatar_bg
widget_recent-comments
mca_mail_limit
widget_recent-posts
mca_gravatar_border
widget_theysaidso_widget
mca_Mail_From_Name
mca_Reserve_List
MyCommentAuthors
...

Browser metrics Passed 4 tests

MyCommentAuthors: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲11613.66 ▼0.951.59 ▼0.6339.65 ▼8.87
Dashboard /wp-admin2,257 ▲726.08 ▲0.2099.00 ▼4.7545.41 ▲3.66
Posts /wp-admin/edit.php2,090 ▲12.02 ▲0.0437.27 ▼3.5333.76 ▼6.18
Add New Post /wp-admin/post-new.php1,536 ▲323.21 ▼0.18650.45 ▲49.2258.08 ▲0.28
Media Library /wp-admin/upload.php1,389 ▼24.34 ▲0.1293.87 ▼3.4045.11 ▲0.97
MyCommentAuthors /wp-admin/options-general.php?page=mycommentauthors1,3672.0624.1938.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/mycommentauthors/mycommentauthors.php+149
    Methods with the same name as their class will not be constructors in a future version of PHP; MyCommentAuthors has a deprecated constructor
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • mca_gravatar_border
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_mycommentauthors
    • mca_gravatar_bg

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=mycommentauthors
    • > Deprecated in wp-content/plugins/mycommentauthors/mycommentauthors.php+149
    Methods with the same name as their class will not be constructors in a future version of PHP; MyCommentAuthors has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=mycommentauthors
    • > Deprecated in wp-content/plugins/mycommentauthors/mycommentauthors.php+263
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=mycommentauthors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in MyCommentAuthors is deprecated since version 4.3.0! Use __construct() instead.
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mycommentauthors
    • > Notice in wp-content/plugins/mycommentauthors/mca-home.php+96
    Undefined index: mth
    • > GET request to /wp-admin/options-general.php?page=mycommentauthors
    • > Notice in wp-content/plugins/mycommentauthors/mca-home.php+114
    Undefined index: yr
    • > GET request to /wp-admin/options-general.php?page=mycommentauthors
    • > Notice in wp-content/plugins/mycommentauthors/mca-home.php+135
    Undefined index: showTable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mycommentauthors
    • > Notice in wp-content/plugins/mycommentauthors/mca-home.php+157
    Undefined index: temp

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mycommentauthors/mailtowarning.php
  • 86× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mycommentauthors/mca-home.php on line 2
    • > PHP Warning
      include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mycommentauthors/SendMail.php on line 3
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/mycommentauthors/gravatar_show.php on line 3
    • > PHP Notice
      Undefined index: page in wp-content/plugins/mycommentauthors/gravatar_tbl.php on line 79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mycommentauthors/html_list.php:69
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/mycommentauthors/html_gravatar.php on line 9
    • > PHP Notice
      Undefined variable: date2 in wp-content/plugins/mycommentauthors/html_list.php on line 65
    • > PHP Notice
      Undefined variable: date2 in wp-content/plugins/mycommentauthors/gravatar_tbl.php on line 3
    • > PHP Warning
      include(login.php): failed to open stream: No such file or directory in wp-content/plugins/mycommentauthors/SendMail.php on line 24
    • > PHP Notice
      Undefined variable: month in wp-content/plugins/mycommentauthors/html_gravatar_tbl.php on line 92

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #3 (Just copy and paste the generated html tag in the TEXT mode of your content editing form.) image required
Please take inspiration from this readme.txt

mycommentauthors/mycommentauthors.php Passed 13 tests

The main PHP file in "MyCommentAuthors" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
109 characters long description:
Generate a list of all your comment authors monthly. Publish the list on your blog and give them a shout out.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,224 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10122691,224

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
images/X-them-sponsore.png2.40KB1.06KB▼ 55.66%