84% elmo-privacylab

Code Review | Elmo

WordPress plugin Elmo scored84%from 54 tests.

About plugin

  • Plugin page: elmo-privacylab
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2022
  • Latest release: Oct 27, 2023
  • Number of updates: 4
  • Update frequency: every 150.7 days
  • Top authors: privacylab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /1,013 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Elmo
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.45 ▲1.24
Dashboard /wp-admin3.33 ▼0.0143.82 ▼19.22
Posts /wp-admin/edit.php3.45 ▲0.0942.53 ▼2.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.20 ▲1.04
Media Library /wp-admin/upload.php3.25 ▲0.0335.33 ▲1.46

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
elmo_code_v2
elmo_language
elmo_code
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Elmo: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.35 ▲0.181.71 ▲0.2044.27 ▲8.22
Dashboard /wp-admin2,249 ▲695.68 ▲0.0884.92 ▼6.7338.95 ▼3.56
Posts /wp-admin/edit.php2,152 ▲492.00 ▼0.0336.71 ▼2.9937.22 ▲1.09
Add New Post /wp-admin/post-new.php1,548 ▲2218.33 ▼5.40641.87 ▼145.3575.09 ▲9.37
Media Library /wp-admin/upload.php1,454 ▲544.25 ▲0.08101.40 ▲1.4242.07 ▼3.94

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
These items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • elmo_code_v2
    • theysaidso_admin_options
    • elmo_code
    • widget_recent-comments
    • elmo_language
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elmo-privacylab/includes/class-elmo-plugin.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elmo-privacylab/includes/class-elmo-plugin.php:47

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 93% from 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: privacy, gdpr, cookie

elmo-privacylab/elmo.php 85% from 13 tests

"Elmo" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 191 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("elmo-privacylab.php" instead of "elmo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected299 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP429144194
PO File1182375
SVG20030

PHP code Passed 2 tests

Analyzing 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.32
Average class complexity12.50
▷ Minimum class complexity10.00
▷ Maximum class complexity15.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected