78% brand-demo-import

Code Review | Brand Demo Import

WordPress plugin Brand Demo Import scored78%from 54 tests.

About plugin

  • Plugin page: brand-demo-import
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Oct 19, 2017
  • Latest release: Nov 15, 2017
  • Number of updates: 4
  • Update frequency: every 6.8 days
  • Top authors: maxsdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,245 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.01MB] [CPU: ▼12.57ms] Passed 4 tests

A check of server-side resources used by Brand Demo Import
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.40 ▼9.16
Dashboard /wp-admin3.32 ▼0.0246.83 ▼25.43
Posts /wp-admin/edit.php3.37 ▲0.0246.37 ▼6.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.26 ▼9.62
Media Library /wp-admin/upload.php3.25 ▲0.0235.12 ▼4.33

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Brand Demo Import
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.30 ▼1.351.88 ▼0.2840.77 ▼2.65
Dashboard /wp-admin2,233 ▲305.84 ▼0.0497.22 ▼19.3042.90 ▼1.49
Posts /wp-admin/edit.php2,115 ▲122.07 ▲0.0736.72 ▲0.4336.28 ▲0.91
Add New Post /wp-admin/post-new.php1,558 ▲1323.34 ▲0.13670.57 ▲32.2954.93 ▼1.06
Media Library /wp-admin/upload.php1,415 ▲184.24 ▲0.02101.93 ▲8.4246.82 ▲5.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/brand-demo-import/brand-demo-import.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/class-wp-customize-setting.php' (include_path='.:/usr/share/php') in wp-content/plugins/brand-demo-import/inc/CustomizerOption.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BDI\\esc_html_e() in wp-content/plugins/brand-demo-import/views/plugin-page.php:14
    • > PHP Warning
      require_once(ABSPATHwp-includes/class-wp-customize-setting.php): failed to open stream: No such file or directory in wp-content/plugins/brand-demo-import/inc/CustomizerOption.php on line 14
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/brand-demo-import/inc/CustomizerOption.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: importer, demo

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

The main PHP script in "Brand Demo Import" version 1.0.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected3,033 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP116149842,531
CSS16910309
JavaScript15068193

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity35.69
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity5.03
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods112
▷ Static methods2724.11%
▷ Public methods9383.04%
▷ Protected methods21.79%
▷ Private methods1715.18%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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