84% eloquent

Code Review | Eloquent

WordPress plugin Eloquent scored84%from 54 tests.

About plugin

  • Plugin page: eloquent
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 5, 2016
  • Latest release: May 20, 2022
  • Number of updates: 4
  • Update frequency: every 504.5 days
  • Top authors: Avram (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /854 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.02MB] [CPU: ▼2.95ms] Passed 4 tests

An overview of server-side resources used by Eloquent
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.35 ▲0.95
Dashboard /wp-admin3.32 ▲0.0248.68 ▼1.10
Posts /wp-admin/edit.php3.38 ▲0.0249.59 ▲1.29
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.52 ▼11.39
Media Library /wp-admin/upload.php3.25 ▲0.0239.16 ▼0.24
Eloquent /wp-admin/options-general.php?page=eloquent-options3.2235.02

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Eloquent
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.56 ▲0.191.60 ▼0.0742.55 ▲0.66
Dashboard /wp-admin2,219 ▲425.74 ▲0.0886.22 ▼4.8439.82 ▼3.24
Posts /wp-admin/edit.php2,128 ▲282.24 ▲0.2435.29 ▼1.1138.50 ▲1.24
Add New Post /wp-admin/post-new.php1,549 ▲1323.10 ▲4.83663.70 ▼2.1758.49 ▼6.19
Media Library /wp-admin/upload.php1,427 ▲244.37 ▲0.1994.35 ▼6.6947.22 ▲3.60
Eloquent /wp-admin/options-general.php?page=eloquent-options8871.8227.0826.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/eloquent/eloquent.php

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Eloquent editor), #2 (Image upload/edit dialog), #3 (Image/element attributes dialog)
You can look at the official readme.txt

eloquent/eloquent.php Passed 13 tests

Analyzing the main PHP file in "Eloquent" version 0.2
42 characters long description:
Awesome front-end editor for your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin863 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP311438373
JavaScript2569360
SVG410129
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity19.50
▷ Minimum class complexity7.00
▷ Maximum class complexity32.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods16.25%
▷ Private methods16.25%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.36MB with 0.26MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png157.16KB58.72KB▼ 62.64%
screenshot-1.png164.82KB46.82KB▼ 71.59%
screenshot-3.png51.18KB11.37KB▼ 77.78%