83% styled-store-demo-importer

Code Review | Styled Store Theme Demo Importer

WordPress plugin Styled Store Theme Demo Importer scored83%from 54 tests.

About plugin

  • Plugin page: styled-store-demo...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jun 26, 2017
  • Latest release: Jun 26, 2017
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: GeJay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,997 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Styled Store Theme Demo Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.26 ▲0.64
Dashboard /wp-admin3.42 ▲0.0848.58 ▼16.16
Posts /wp-admin/edit.php3.48 ▲0.1251.36 ▲1.30
Add New Post /wp-admin/post-new.php5.94 ▲0.0685.81 ▼16.93
Media Library /wp-admin/upload.php3.29 ▲0.0640.91 ▲2.64
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.3534.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Styled Store Theme Demo Importer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.42 ▲0.141.62 ▼0.0342.25 ▼1.97
Dashboard /wp-admin2,232 ▲525.59 ▼0.0290.80 ▼1.3944.69 ▲5.24
Posts /wp-admin/edit.php2,143 ▲432.03 ▲0.0240.90 ▲1.4640.24 ▲5.83
Add New Post /wp-admin/post-new.php1,556 ▲2823.46 ▲0.30604.74 ▼30.4750.68 ▼4.12
Media Library /wp-admin/upload.php1,439 ▲424.31 ▲0.17103.07 ▲2.1850.88 ▲6.60
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9992.0525.2932.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/styled-store-demo-importer/tgmpa/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/styled-store-demo-importer/tgmpa/class-tgm-plugin-activation.php:2109

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot.jpg) image missing
The official readme.txt is a good inspiration

styled-store-demo-importer/styledstore-demo-importer.php 85% from 13 tests

This is the main PHP file of "Styled Store Theme Demo Importer" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("styled-store-demo-importer.php" instead of "styledstore-demo-importer.php")

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
No dangerous file extensions were detected37,624 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
XML1431629,877
PO File181,5362,0895,113
PHP35091,7371,856
Markdown41850778

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity42.38
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods109
▷ Static methods65.50%
▷ Public methods8477.06%
▷ Protected methods2321.10%
▷ Private methods21.83%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.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
No PNG files were detected