90% envothemes-demo-import

Code Review | EnvoThemes Demo Import

WordPress plugin EnvoThemes Demo Import scored90%from 54 tests.

About plugin

  • Plugin page: envothemes-demo-i...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2019
  • Latest release: Dec 9, 2022
  • Number of updates: 60
  • Update frequency: every 20.6 days
  • Top authors: envothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

9,000+ active /400,168 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by EnvoThemes Demo Import
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0738.31 ▼2.37
Dashboard /wp-admin3.38 ▲0.0748.97 ▲2.49
Posts /wp-admin/edit.php3.50 ▲0.1346.33 ▼5.57
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.71 ▼14.14
Media Library /wp-admin/upload.php3.31 ▲0.0736.04 ▲3.01

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for EnvoThemes Demo Import
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▲0.061.66 ▼0.0843.33 ▲3.07
Dashboard /wp-admin2,197 ▲265.62 ▲0.0381.68 ▼4.5438.22 ▼3.06
Posts /wp-admin/edit.php2,102 ▲21.97 ▼0.0234.26 ▼4.0635.91 ▲2.80
Add New Post /wp-admin/post-new.php1,528 ▲223.11 ▼0.02694.17 ▲15.9659.37 ▲5.21
Media Library /wp-admin/upload.php1,399 ▼14.19 ▲0.0093.49 ▲0.3343.80 ▼3.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • envothemes-demo-import-version
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were not plugin tags detected

envothemes-demo-import/envothemes-demo-import.php Passed 13 tests

The main PHP file in "EnvoThemes Demo Import" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
95 characters long description:
Import EnvoThemes official themes demo content, widgets and theme settings with just one click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected7,110 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP179841,0484,268
CSS9264141,981
JavaScript6296151861

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity37.74
▷ Minimum class complexity3.00
▷ Maximum class complexity196.00
Average method complexity5.85
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods144
▷ Static methods2416.67%
▷ Public methods13493.06%
▷ Protected methods42.78%
▷ Private methods64.17%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 0.53MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/envo-online-store-notify.png112.93KB32.56KB▼ 71.17%
img/envo-shop-logo.png1.90KB1.17KB▼ 38.43%
img/envo-online-store-logo.png2.79KB1.66KB▼ 40.64%
img/envo-shop-notify.png125.06KB31.75KB▼ 74.61%
img/envo-shopper.png73.10KB21.66KB▼ 70.38%