79% mentionable

Code Review | Mentionable

WordPress plugin Mentionable scored79%from 54 tests.

About plugin

  • Plugin page: mentionable
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4
  • WordPress version: 6.3.1
  • First release: Nov 5, 2013
  • Latest release: Nov 24, 2015
  • Number of updates: 16
  • Update frequency: every 46.8 days
  • Top authors: jonathanbardo (93.75%)westonruter (12.5%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /8,252 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.83ms] Passed 4 tests

Analyzing server-side resources used by Mentionable
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.30 ▲1.96
Dashboard /wp-admin3.33 ▼0.0148.93 ▼13.05
Posts /wp-admin/edit.php3.39 ▲0.0348.46 ▼1.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.34 ▼6.54
Media Library /wp-admin/upload.php3.26 ▲0.0339.39 ▲3.12
Mentionable /wp-admin/options-general.php?page=mentionable3.2231.34

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Mentionable
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.171.70 ▲0.0440.40 ▼5.67
Dashboard /wp-admin2,196 ▲165.61 ▼0.0187.68 ▼1.7041.70 ▼5.79
Posts /wp-admin/edit.php2,106 ▲62.04 ▲0.0633.91 ▼3.6438.43 ▲2.84
Add New Post /wp-admin/post-new.php1,533 ▲722.87 ▼0.31633.11 ▼47.2251.91 ▲0.24
Media Library /wp-admin/upload.php1,398 ▼24.26 ▲0.0597.65 ▼7.3144.25 ▼1.49
Mentionable /wp-admin/options-general.php?page=mentionable9391.9922.3928.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mentionable/templates/mentionable.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Trying to get property 'mentionable_tag_content' of non-object in wp-content/plugins/mentionable/templates/mentionable.php on line 2
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/mentionable/templates/mentionable.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required '/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/mentionable/tests/bootstrap.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/mentionable/tests/test-mentionable-postmetas.php:8
    • > PHP Warning
      require_once(/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/mentionable/tests/bootstrap.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/mentionable/tests/test-mentionable.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mentionable/mentionable.php:97

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: mention, admin, tinymce

mentionable/mentionable.php Passed 13 tests

The main PHP script in "Mentionable" version 0.4.3 is automatically included on every request by WordPress
66 characters long description:
Mention WordPress content with inline autocomplete inside tinyMCE.

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
No dangerous file extensions were detected1,334 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP11193464640
JavaScript140118232
Bourne Again Shell24118172
Markdown340087
PO File1111448
Bourne Shell112647
XML35044
CSS241236
YAML15028

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity7.62
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods3995.12%
▷ Protected methods00.00%
▷ Private methods24.88%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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