10% lean-wp-engine-staging-theme

Code Review | Lean WP Engine Staging Theme

WordPress plugin Lean WP Engine Staging Theme scored10%from 54 tests.

About plugin

  • Plugin page: lean-wp-engine-st...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 12, 2015
  • Latest release: Aug 9, 2018
  • Number of updates: 7
  • Update frequency: every 161.3 days
  • Top authors: LeanPlugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,220 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/lean-wp-engine-staging-theme/lean-wp-engine-staging-theme.php+26
    Use of undefined constant WP_SITEURL - assumed 'WP_SITEURL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼51.51ms] Passed 4 tests

Analyzing server-side resources used by Lean WP Engine Staging Theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.415.13 ▼33.46
Dashboard /wp-admin2.07 ▼1.235.97 ▼45.08
Posts /wp-admin/edit.php2.07 ▼1.296.63 ▼39.90
Add New Post /wp-admin/post-new.php2.07 ▼3.826.01 ▼87.61
Media Library /wp-admin/upload.php2.07 ▼1.164.81 ▼27.50

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Lean WP Engine Staging Theme
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.06 ▼0.291.62 ▼0.4241.89 ▲2.98
Dashboard /wp-admin2,198 ▲185.66 ▲0.0280.45 ▼18.3339.61 ▼7.65
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0039.27 ▲1.1136.05 ▲0.71
Add New Post /wp-admin/post-new.php1,536 ▲1018.04 ▼5.24617.05 ▼52.6863.51 ▲12.55
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0497.77 ▼3.2640.80 ▼5.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/lean-wp-engine-staging-theme/lean-wp-engine-staging-theme.php+26
    Use of undefined constant WP_SITEURL - assumed 'WP_SITEURL' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_SITEURL - assumed 'WP_SITEURL' (this will throw an Error in a future version of PHP) in wp-content/plugins/lean-wp-engine-staging-theme/lean-wp-engine-staging-theme.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

lean-wp-engine-staging-theme/lean-wp-engine-staging-theme.php 92% from 13 tests

"Lean WP Engine Staging Theme" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected50 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1202527
CSS13123

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected