84% alojapro-comments

Code Review | Alojapro Comments

WordPress plugin Alojapro Comments scored84%from 54 tests.

About plugin

  • Plugin page: alojapro-comments
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: Nov 22, 2022
  • Latest release: Nov 22, 2022
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: alojapro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.35ms] Passed 4 tests

This is a short check of server-side resources used by Alojapro Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0341.98 ▼0.39
Dashboard /wp-admin3.38 ▲0.0450.84 ▲0.63
Posts /wp-admin/edit.php3.50 ▲0.1052.71 ▲7.01
Add New Post /wp-admin/post-new.php5.97 ▲0.0497.87 ▼5.82
Media Library /wp-admin/upload.php3.31 ▲0.0436.17 ▲0.18

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Alojapro Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.64 ▲0.291.96 ▲0.0343.66 ▼0.16
Dashboard /wp-admin2,204 ▲275.48 ▼0.1782.68 ▼9.2140.34 ▲0.84
Posts /wp-admin/edit.php2,112 ▲121.99 ▲0.0438.90 ▲1.8435.59 ▲2.40
Add New Post /wp-admin/post-new.php1,536 ▲1023.09 ▼0.09709.72 ▲29.9355.95 ▲5.07
Media Library /wp-admin/upload.php1,412 ▲154.29 ▲0.1497.09 ▼17.0244.45 ▼1.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/alojapro-comments/scripts/comments.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/alojapro-comments/scripts/numberOfComments.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/alojapro-comments/commentsPlugin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: hotels, testimonials, comments

alojapro-comments/commentsPlugin.php 92% from 13 tests

"Alojapro Comments" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("alojapro-comments.php" instead of "commentsPlugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected173 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP54759173

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.50
▷ Minimum class complexity2.00
▷ Maximum class complexity13.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected