94% gmail-comment-approval

Code Review | Gmail Comment Approval

WordPress plugin Gmail Comment Approval scored 94% from 54 tests.

About plugin

  • Plugin page: gmail-comment-app...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 5.8.1
  • First release: Mar 11, 2014
  • Latest release: Mar 16, 2014
  • Number of updates: 13
  • Update frequency: every 0.5 days
  • Top authors: UmeshSingla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 989 total downloads

Benchmarks

Plugin footprint Passed 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.02MB] [CPU: ▼141.62ms] Passed 4 tests

This is a short check of server-side resources used by Gmail Comment Approval
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1434.65 ▲10.15
Dashboard /wp-admin3.08 ▲0.0343.29 ▲0.53
Posts /wp-admin/edit.php3.14 ▲0.0346.49 ▲1.39
Add New Post /wp-admin/post-new.php5.44 ▲0.0188.29 ▼564.20
Media Library /wp-admin/upload.php3.03 ▲0.0330.93 ▼4.19

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gmail Comment Approval
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.92 ▲0.3011.01 ▼0.0353.66 ▲12.55
Dashboard /wp-admin2,967 ▲335.93 ▼0.16133.68 ▼15.36114.10 ▲1.65
Posts /wp-admin/edit.php2,739 ▲32.72 ▲0.0261.75 ▼1.7987.97 ▲0.79
Add New Post /wp-admin/post-new.php1,672 ▼018.73 ▼0.35376.83 ▼7.60105.70 ▼9.09
Media Library /wp-admin/upload.php1,807 ▼35.01 ▼0.02163.98 ▲22.49116.48 ▲3.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gmail-comment-approval/index.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: comment moderation, gmail actions

gmail-comment-approval/index.php 85% from 13 tests

The main file in "Gmail Comment Approval" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("gmail-comment-approval.php" instead of "index.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
Everything looks great! No dangerous files found in this plugin121 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22290121

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin