84% mirrorgrid-demo-importer

Code Review | Mirrorgrid Demo Importer

WordPress plugin Mirrorgrid Demo Importer scored84%from 54 tests.

About plugin

  • Plugin page: mirrorgrid-demo-i...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 12, 2018
  • Latest release: Oct 12, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mirrorgrid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼4.22ms] Passed 4 tests

An overview of server-side resources used by Mirrorgrid Demo Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.75 ▼1.79
Dashboard /wp-admin3.81 ▲0.4645.47 ▼13.39
Posts /wp-admin/edit.php3.86 ▲0.5048.69 ▲4.59
Add New Post /wp-admin/post-new.php6.33 ▲0.4482.02 ▼6.28
Media Library /wp-admin/upload.php3.67 ▲0.4438.86 ▲5.88
Import Demo Content /wp-admin/themes.php?page=mirrorgrid-demo-importer3.6433.94

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Mirrorgrid Demo Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.53 ▲0.261.76 ▲0.1143.61 ▲4.57
Dashboard /wp-admin2,199 ▲225.57 ▼0.0885.42 ▼5.9439.65 ▲0.76
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0735.60 ▼1.0533.30 ▼2.43
Add New Post /wp-admin/post-new.php1,529 ▼222.98 ▼0.04648.93 ▼29.1051.57 ▼3.07
Media Library /wp-admin/upload.php1,407 ▲74.31 ▲0.0898.99 ▼1.9242.86 ▼3.19
Import Demo Content /wp-admin/themes.php?page=mirrorgrid-demo-importer9391.9334.8130.97

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/mirrorgrid-demo-importer/includes/class-mg-customizer-option.php:12
    • > PHP Warning
      Use of undefined constant MG_ABSPATH - assumed 'MG_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mirrorgrid-demo-importer/includes/class-mg-logger.php on line 10
    • > PHP Fatal error
      require(): Failed opening required 'MG_ABSPATHinc/importer/class-logger.php' (include_path='.:/usr/share/php') in wp-content/plugins/mirrorgrid-demo-importer/includes/class-mg-logger.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'MG_Importer_Logger' not found in wp-content/plugins/mirrorgrid-demo-importer/includes/importer/class-mg-importer-logger-cli.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'MG_Importer_WXR_Importer' not found in wp-content/plugins/mirrorgrid-demo-importer/includes/class-mg-wxr-importer.php:10
    • > PHP Warning
      require(MG_ABSPATHinc/importer/class-logger.php): failed to open stream: No such file or directory in wp-content/plugins/mirrorgrid-demo-importer/includes/class-mg-logger.php on line 10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 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
8 plugin tags: demo, content, menus, settings, data...

mirrorgrid-demo-importer/mirrorgrid-demo-importer.php Passed 13 tests

"Mirrorgrid Demo Importer" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
42 characters long description:
Demo importer for Mirrorgrid Store themes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,156 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP229581,4792,992
JavaScript119794
CSS124770

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity25.37
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes211.11%
Methods152
▷ Static methods3724.34%
▷ Public methods9159.87%
▷ Protected methods3422.37%
▷ Private methods2717.76%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants12
▷ Global constants1083.33%
▷ Class constants216.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin