10% wp-enterprise-extension

Code Review | WP Enterprise Extension

WordPress plugin WP Enterprise Extension scored10%from 54 tests.

About plugin

  • Plugin page: wp-enterprise-ext...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9.0
  • WordPress version: 6.3.1
  • First release: Mar 7, 2014
  • Latest release: Apr 19, 2014
  • Number of updates: 3
  • Update frequency: every 17.0 days
  • Top authors: kasigi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /849 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-enterprise-extension/wp-enterprise-extension.php+22
    Use of undefined constant WEX_VERSION_KEY - assumed 'WEX_VERSION_KEY' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼60.33ms] Passed 4 tests

An overview of server-side resources used by WP Enterprise Extension
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.13 ▼40.14
Dashboard /wp-admin2.08 ▼1.225.18 ▼49.33
Posts /wp-admin/edit.php2.09 ▼1.286.01 ▼41.99
Add New Post /wp-admin/post-new.php2.09 ▼3.815.40 ▼109.87
Media Library /wp-admin/upload.php2.10 ▼1.136.01 ▼33.09
Install Plugins /wp-admin/themes.php?page=install-required-plugins2.116.11

Server storage [IO: ▲0.14MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (0.40KB) outside of "wp-content/plugins/wp-enterprise-extension/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyonepage-custom-blank.php
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
WEX_VERSION_KEY
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Enterprise Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲13214.29 ▼0.311.55 ▲0.0238.09 ▼6.13
Dashboard /wp-admin2,301 ▲1245.64 ▲0.0393.60 ▲0.3250.42 ▲6.10
Posts /wp-admin/edit.php2,218 ▲1182.16 ▲0.1441.92 ▲0.7641.17 ▲4.81
Add New Post /wp-admin/post-new.php6,338 ▲4,80726.36 ▲3.25923.71 ▲234.7361.29 ▲9.73
Media Library /wp-admin/upload.php1,514 ▲1114.16 ▼0.03113.10 ▲15.5453.52 ▲7.65
Install Plugins /wp-admin/themes.php?page=install-required-plugins1,5002.0522.8029.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/wp-enterprise-extension/wp-enterprise-extension.php+22
    Use of undefined constant WEX_VERSION_KEY - assumed 'WEX_VERSION_KEY' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • WEX_VERSION_KEY
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=install-required-plugins
    • > Warning in wp-content/plugins/wp-enterprise-extension/wp-enterprise-extension.php+25
    Use of undefined constant WEX_VERSION_KEY - assumed 'WEX_VERSION_KEY' (this will throw an Error in a future version of PHP)

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
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/wp-enterprise-extension/components/page-custom-blank.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/wp-enterprise-extension/components/acf-fields/wp_wysiwyg-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/wp-enterprise-extension/wex-css-delivery.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action_ref_array() in wp-content/plugins/wp-enterprise-extension/components/class-tgm-plugin-activation.php:174

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: acf, enterprise

wp-enterprise-extension/wp-enterprise-extension.php Passed 13 tests

"WP Enterprise Extension" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
86 characters long description:
This plugin will install and begin the hardening process for enterprise installations.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,793 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP96059241,793

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity40.80
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity5.15
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods48
▷ Static methods12.08%
▷ Public methods4287.50%
▷ Protected methods612.50%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin