78% eros

Code Review | Eros

WordPress plugin Eros scored 78% from 54 tests.

About plugin

  • Plugin page: eros
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 6.3.1
  • First release: Dec 12, 2018
  • Latest release: Dec 14, 2018
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: moleisking (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 571 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Eros
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.09 ▼8.38
Dashboard /wp-admin3.33 ▲0.0346.27 ▼1.87
Posts /wp-admin/edit.php3.38 ▲0.0348.41 ▲3.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.68 ▼2.82
Media Library /wp-admin/upload.php3.26 ▲0.0336.88 ▲2.78
Eros /wp-admin/admin.php?page=eros-info-page3.2232.65
Configuration /wp-admin/admin.php?page=eros-configuration-page3.2231.67

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_eroswidget

Browser metrics Passed 4 tests

A check of browser resources used by Eros
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲14614.01 ▼0.3610.06 ▲8.3849.56 ▲0.80
Dashboard /wp-admin2,232 ▲445.79 ▼0.1894.03 ▼6.6039.42 ▼6.86
Posts /wp-admin/edit.php2,115 ▲262.05 ▲0.0034.81 ▼0.9829.57 ▼5.12
Add New Post /wp-admin/post-new.php1,553 ▲723.40 ▲5.17651.51 ▲27.1554.87 ▼7.64
Media Library /wp-admin/upload.php1,405 ▲174.13 ▼0.04102.38 ▼4.2147.08 ▲1.75
Eros /wp-admin/admin.php?page=eros-info-page8132.0227.7431.76
Configuration /wp-admin/admin.php?page=eros-configuration-page8602.0324.2628.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_eroswidget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/eros/eros-admin.php
    • > /wp-content/plugins/eros/eros-widget.php
    • > /wp-content/plugins/eros/eros.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eros/eros-shortcode.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: field, strain, id, user, stress...

eros/eros.php 92% from 13 tests

The main PHP file in "Eros" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 179 characters long)

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
Success! There were no dangerous files found in this plugin948 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP55391277
CSS224245
JavaScript23239238
SVG401162
Markdown17026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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