84% wl-import-demo

Code Review | WL Import Demo

WordPress plugin WL Import Demo scored84%from 54 tests.

About plugin

  • Plugin page: wl-import-demo
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Sep 22, 2023
  • Number of updates: 4
  • Update frequency: every 77.7 days
  • Top authors: websitelearnings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.39MB] [CPU: ▼1.02ms] Passed 4 tests

Analyzing server-side resources used by WL Import Demo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4337.78 ▼2.81
Dashboard /wp-admin3.74 ▲0.4347.66 ▼10.13
Posts /wp-admin/edit.php3.79 ▲0.4348.85 ▲3.20
Add New Post /wp-admin/post-new.php6.25 ▲0.36111.50 ▲23.25
Media Library /wp-admin/upload.php3.60 ▲0.3637.36 ▲5.66

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WL Import Demo
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.24 ▼1.061.75 ▼0.1843.76 ▼2.83
Dashboard /wp-admin2,206 ▲184.86 ▼0.03108.28 ▼7.9541.24 ▼6.31
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0539.80 ▲3.7735.08 ▲1.61
Add New Post /wp-admin/post-new.php1,542 ▲2318.04 ▼5.13602.78 ▼113.1373.25 ▲19.11
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0297.96 ▼3.7142.34 ▼5.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wl-import-demo/wl-import-demo.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wl-import-demo/includes/tgmpa/class-tgm-plugin-activation.php:2016

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: import, data, theme options, settings, demo...

wl-import-demo/wl-import-demo.php 92% from 13 tests

The primary PHP file in "WL Import Demo" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected1,858 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35301,5831,858

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity41.62
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods102
▷ Static methods54.90%
▷ Public methods7977.45%
▷ Protected methods2322.55%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin