84% dx-localhost

Code Review | DX localhost

WordPress plugin DX localhost scored 84% from 54 tests.

About plugin

  • Plugin page: dx-localhost
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2014
  • Latest release: Nov 15, 2019
  • Number of updates: 12
  • Update frequency: every 179.8 days
  • Top authors: devrix (50%)nofearinc (41.67%)metodiew (25%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 2,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.76ms] Passed 4 tests

A check of server-side resources used by DX localhost
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.75 ▼1.64
Dashboard /wp-admin3.38 ▲0.0846.54 ▲0.62
Posts /wp-admin/edit.php3.43 ▲0.0749.28 ▲4.63
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.93 ▼7.88
Media Library /wp-admin/upload.php3.30 ▲0.0734.26 ▲1.85
DX localhost /wp-admin/options-general.php?page=dx_localhost_options3.2730.12

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
dx-localhost-settings
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for DX localhost
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10813.23 ▼1.154.61 ▲2.8236.63 ▼5.43
Dashboard /wp-admin2,225 ▲375.83 ▲0.97103.01 ▼3.5143.24 ▼1.36
Posts /wp-admin/edit.php2,120 ▲312.02 ▼0.0038.48 ▲4.1537.85 ▲2.37
Add New Post /wp-admin/post-new.php1,615 ▲8118.34 ▼4.75605.97 ▼44.1648.68 ▼8.76
Media Library /wp-admin/upload.php1,413 ▲284.25 ▼0.0396.37 ▼3.5143.24 ▲0.71
DX localhost /wp-admin/options-general.php?page=dx_localhost_options1,6513.0569.1231.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • dx-localhost-settings
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/dx-localhost/dx-localhost.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: plugin, staging, development, notice, toolbar...

dx-localhost/dx-localhost.php Passed 13 tests

"DX localhost" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Display a notice box when you're working on localhost or a staging server

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected479 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP27362317
PO File2161667
Markdown116040
JavaScript23032
CSS11023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods531.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png78.12KB28.32KB▼ 63.74%
screenshot-1.png48.61KB19.40KB▼ 60.10%