78% enectowl

Code Review | Enecto WL plugin

WordPress plugin Enecto WL plugin scored78%from 54 tests.

About plugin

  • Plugin page: enectowl
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2017
  • Latest release: Mar 13, 2017
  • Number of updates: 9
  • Update frequency: every 5.1 days
  • Top authors: johano99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /632 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.19ms] Passed 4 tests

This is a short check of server-side resources used by Enecto WL plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.82 ▼0.03
Dashboard /wp-admin3.37 ▲0.0650.97 ▲0.92
Posts /wp-admin/edit.php3.40 ▲0.0448.20 ▲1.69
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.54 ▼15.13
Media Library /wp-admin/upload.php3.28 ▲0.0436.31 ▲1.50
Dashboard /wp-admin/admin.php?page=enectowl-dashboard3.2529.02
Settings /wp-admin/admin.php?page=enectowl-settings3.2426.23

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Enecto WL plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,216 ▲47015.99 ▲1.631.62 ▼0.0739.43 ▼3.52
Dashboard /wp-admin2,616 ▲4256.79 ▲1.93155.45 ▲34.3042.30 ▼2.91
Posts /wp-admin/edit.php2,116 ▲302.05 ▲0.0937.54 ▲2.2236.70 ▲2.70
Add New Post /wp-admin/post-new.php1,536 ▲817.54 ▼0.83676.24 ▲12.9252.01 ▼2.54
Media Library /wp-admin/upload.php1,415 ▲304.18 ▲0.0395.88 ▼1.9242.71 ▲0.58
Dashboard /wp-admin/admin.php?page=enectowl-dashboard1,7274.0484.8662.99
Settings /wp-admin/admin.php?page=enectowl-settings8182.0525.3923.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not 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
Please fix the following
  • 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/enectowl/enectowl.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=enectowl-dashboard
    • > Network (severe)
    https://wl.enecto.com/service/statistics?period=30 - Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID
    • > GET request to /wp-admin/admin.php?page=enectowl-dashboard
    • > Network (severe)
    https://wl.enecto.com/service/leads - Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in enectowl/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === enectowl === )
The official readme.txt might help

enectowl/enectowl.php Passed 13 tests

"Enecto WL plugin" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Provides EnectoWL statistics and leads to Wordpress admin dashboard.

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
There were no executable files found in this plugin14,720 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92,5361,67113,986
PHP59614413
CSS4128321

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
resources/flags16.png61.80KB19.90KB▼ 67.79%