84% ments

Code Review | autometa's MENTS

WordPress plugin autometa's MENTS scored84%from 54 tests.

About plugin

  • Plugin page: ments
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-4.9.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2017
  • Latest release: Jan 18, 2018
  • Number of updates: 6
  • Update frequency: every 23.3 days
  • Top authors: JorgeAmVF (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.02ms] Passed 4 tests

Analyzing server-side resources used by autometa's MENTS
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0438.64 ▼4.42
Dashboard /wp-admin3.35 ▲0.0048.53 ▼13.41
Posts /wp-admin/edit.php3.40 ▲0.0443.35 ▼7.26
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.91 ▼6.97
Media Library /wp-admin/upload.php3.27 ▲0.0433.70 ▼1.36

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by autometa's MENTS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.35 ▲0.001.89 ▼0.1044.98 ▼0.25
Dashboard /wp-admin2,198 ▲215.63 ▼0.0383.86 ▼8.7739.32 ▼6.86
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0635.76 ▼5.3734.72 ▼6.93
Add New Post /wp-admin/post-new.php1,535 ▲918.08 ▼5.21593.41 ▼114.1165.02 ▼8.18
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0093.97 ▼9.1543.51 ▼1.58

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ments/ments.php:44

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: recent comments, comment, automation, recent, list...

ments/ments.php Passed 13 tests

The main file in "autometa's MENTS" v. 2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
It reproduces comment lists in pages, posts, portfolios or products simply via: [ments] and [recents].

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
No dangerous file extensions were detected214 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP135191214

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity4.50
▷ Minimum method complexity2.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods337.50%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin