68% theepi

Code Review | TheEPI

WordPress plugin TheEPI scored68%from 54 tests.

About plugin

  • Plugin page: theepi
  • Plugin version: 0.7.0
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3.0
  • WordPress version: 6.3.1
  • First release: Dec 14, 2017
  • Latest release: Dec 2, 2019
  • Number of updates: 24
  • Update frequency: every 31.8 days
  • Top authors: Evarisk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,023 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.60MB] [CPU: ▼27.64ms] Passed 4 tests

This is a short check of server-side resources used by TheEPI
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.95 ▲1.4945.74 ▲3.47
Dashboard /wp-admin4.50 ▲1.1636.68 ▼28.18
Posts /wp-admin/edit.php4.58 ▲1.2239.57 ▼11.91
Add New Post /wp-admin/post-new.php4.57 ▼1.3138.15 ▼71.07
Media Library /wp-admin/upload.php4.58 ▲1.3539.43 ▲0.61
Go to WP Admin /wp-admin/admin.php?page=go-to-wp-admin4.5835.82
Minimize menu /wp-admin/admin.php?page=minimize-menu4.5837.70

Server storage [IO: ▲4.78MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 523 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
plugin_permalinks_flushed
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by TheEPI
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,599 ▼16213.80 ▼0.9211.90 ▲10.2639.51 ▲0.85
Dashboard /wp-admin1,890 ▼2875.50 ▼0.1780.65 ▼15.8141.95 ▼3.04
Posts /wp-admin/edit.php2,241 ▲1382.30 ▲0.2938.61 ▼2.0537.60 ▲1.41
Add New Post /wp-admin/post-new.php1,581 ▲5521.46 ▼1.39721.08 ▲18.9736.73 ▼18.83
Media Library /wp-admin/upload.php1,587 ▲1904.37 ▲0.1098.74 ▼16.8741.58 ▼8.26
Go to WP Admin /wp-admin/admin.php?page=go-to-wp-admin7651.8325.7922.43
Minimize menu /wp-admin/admin.php?page=minimize-menu7651.8126.0416.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/theepi/core/action/class-theepi-core-action.php+156
    Creating default object from empty value
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • plugin_permalinks_flushed
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=minimize-menu
    • > Warning in wp-content/plugins/theepi/core/action/class-theepi-core-action.php+156
    Creating default object from empty value
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=minimize-menu
    • > Notice in wp-content/plugins/theepi/core/external/eo-framework/modules/wpeo-custom-menu/view/content.view.php+32
    Uninitialized string offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=minimize-menu
    • > Warning in wp-content/plugins/theepi/core/external/eo-framework/modules/wpeo-custom-menu/view/content.view.php+35
    call_user_func() expects parameter 1 to be a valid callback, function '' not found or invalid function name

SRP 50% 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function theepi\\plugin_dir_path() in wp-content/plugins/theepi/theepi.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Audit_Class' not found in wp-content/plugins/theepi/modules/audit/view/index.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Dashboard) image required
The official readme.txt is a good inspiration

theepi/theepi.php Passed 13 tests

The main PHP script in "TheEPI" version 0.7.0 is automatically included on every request by WordPress
72 characters long description:
TheEPI is the open source software for the daily management of your PPE.

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
Everything looks great! No dangerous files found in this plugin48,704 lines of code in 405 files:
LanguageFilesBlank linesComment linesLines of code
PHP1503,7377,94313,805
SVG3008,611
JavaScript371,4073,8758,264
Sass1565161727,988
CSS161,0873897,256
HTML19281361,922
PO File3220330432
JSON1710249
Markdown41020177

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.80
▷ Minimum class complexity1.00
▷ Maximum class complexity553.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes100
▷ Abstract classes11.00%
▷ Concrete classes9999.00%
▷ Final classes00.00%
Methods548
▷ Static methods7714.05%
▷ Public methods49991.06%
▷ Protected methods325.84%
▷ Private methods173.10%
Functions22
▷ Named functions940.91%
▷ Anonymous functions1359.09%
Constants98
▷ Global constants9798.98%
▷ Class constants11.02%
▷ Public constants1100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/assets/images/icon-256x256_blanc.png9.68KB3.71KB▼ 61.71%
core/assets/images/icon-256x256.png10.58KB3.91KB▼ 63.03%