84% after-comment-prompts

Code Review | After Comment Prompts

WordPress plugin After Comment Prompts scored84%from 54 tests.

About plugin

  • Plugin page: after-comment-pro...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 19, 2016
  • Latest release: Dec 9, 2018
  • Number of updates: 3
  • Update frequency: every 351.7 days
  • Top authors: renventura (66.67%)EngageWP (66.67%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,266 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.32ms] Passed 4 tests

Server-side resources used by After Comment Prompts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0945.46 ▲6.30
Dashboard /wp-admin3.39 ▲0.0549.12 ▼13.76
Posts /wp-admin/edit.php3.51 ▲0.1551.75 ▼0.44
Add New Post /wp-admin/post-new.php5.97 ▲0.0998.01 ▼7.05
Media Library /wp-admin/upload.php3.32 ▲0.0937.94 ▲3.96

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/after-comment-prompts/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

After Comment Prompts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.25 ▼0.921.97 ▲0.1145.25 ▲2.09
Dashboard /wp-admin2,224 ▲214.87 ▼1.01113.32 ▲9.0341.96 ▼3.96
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0341.05 ▲3.6534.49 ▼4.49
Add New Post /wp-admin/post-new.php1,545 ▲1923.35 ▲5.70635.31 ▼42.1949.75 ▼6.68
Media Library /wp-admin/upload.php1,400 ▼04.26 ▲0.0596.05 ▼11.2143.29 ▼3.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/after-comment-prompts/templates/modal-content.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/after-comment-prompts/after-comment-prompts.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/after-comment-prompts/includes/admin/customizer-output.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: comments, follows, social, modal, prompts

after-comment-prompts/after-comment-prompts.php Passed 13 tests

"After Comment Prompts" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
131 characters long description:
Display a modal prompt after a user succesfully posts a comment. Great for calls to action like social follows, product views, etc.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin484 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7170228418
Markdown129043
CSS21013
JavaScript30010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.50
▷ Minimum class complexity6.00
▷ Maximum class complexity17.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG files were detected