80% easy-digital-downloads-htaccess-editor

Code Review | Easy Digital Downloads - htaccess Editor

WordPress plugin Easy Digital Downloads - htaccess Editor scored80%from 54 tests.

About plugin

  • Plugin page: easy-digital-down...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Nov 3, 2014
  • Latest release: Apr 20, 2015
  • Number of updates: 4
  • Update frequency: every 42.0 days
  • Top authors: section214 (75%)cklosows (50%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,016 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.91MB] [CPU: ▼54.24ms] Passed 4 tests

A check of server-side resources used by Easy Digital Downloads - htaccess Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.05 ▼36.35
Dashboard /wp-admin2.10 ▼1.206.57 ▼42.13
Posts /wp-admin/edit.php2.10 ▼1.266.67 ▼47.21
Add New Post /wp-admin/post-new.php2.10 ▼3.795.73 ▼91.28
Media Library /wp-admin/upload.php2.10 ▼1.135.87 ▼27.70

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Digital Downloads - htaccess Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.25 ▼0.021.73 ▼0.1143.35 ▼7.15
Dashboard /wp-admin2,195 ▲185.59 ▼0.0086.19 ▼7.4142.44 ▼2.34
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0233.75 ▼3.3934.41 ▼3.31
Add New Post /wp-admin/post-new.php1,531 ▼022.91 ▼0.54696.41 ▲51.4453.46 ▲2.96
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.07102.54 ▼7.5544.16 ▼0.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/easy-digital-downloads-htaccess-editor/edd-htaccess-editor.php+255
    Undefined property: EDD_Extension_Activation::$run
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: easy digital downloads, rules, htaccess

easy-digital-downloads-htaccess-editor/edd-htaccess-editor.php 92% from 13 tests

The main PHP script in "Easy Digital Downloads - htaccess Editor" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-digital-downloads-htaccess-editor.php" instead of "edd-htaccess-editor.php")

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
Success! There were no dangerous files found in this plugin153 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP261143145
Markdown1508

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.00
▷ Minimum class complexity5.00
▷ Maximum class complexity9.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods19.09%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected