83% sirat-demo-importer

Code Review | Sirat Demo Importer

WordPress plugin Sirat Demo Importer scored83%from 54 tests.

About plugin

  • Plugin page: sirat-demo-importer
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2021
  • Latest release: Dec 9, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: vowelweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /363 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.57ms] Passed 4 tests

This is a short check of server-side resources used by Sirat Demo Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1244.99 ▲4.09
Dashboard /wp-admin3.43 ▲0.0949.20 ▼17.20
Posts /wp-admin/edit.php3.49 ▲0.1350.99 ▲1.72
Add New Post /wp-admin/post-new.php5.97 ▲0.0986.80 ▼14.90
Media Library /wp-admin/upload.php3.30 ▲0.0740.51 ▲4.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sirat Demo Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲9813.67 ▼0.902.38 ▲0.5936.14 ▼7.57
Dashboard /wp-admin2,249 ▲725.86 ▲0.17102.34 ▲9.5379.66 ▲38.97
Posts /wp-admin/edit.php2,183 ▲832.22 ▲0.1941.96 ▲4.2565.95 ▲26.87
Add New Post /wp-admin/post-new.php1,752 ▲22122.70 ▼0.48678.29 ▲8.0348.08 ▼4.52
Media Library /wp-admin/upload.php1,473 ▲734.56 ▲0.36109.42 ▲7.0294.10 ▲47.94

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/sirat-demo-importer/whizzie/tgmpa/sirat-demo-importer-class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/sirat-demo-importer/whizzie/tgmpa/sirat-demo-importer-class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sirat-demo-importer/plugin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/sirat-demo-importer/whizzie/config.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: templates, page builder, one click demo import, website builder, elementor

sirat-demo-importer/plugin.php 77% from 13 tests

"Sirat Demo Importer" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 571 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "5.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sirat-demo-importer.php" instead of "plugin.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
Everything looks great! No dangerous files found in this plugin6,340 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP68621,9083,286
CSS2362142,097
JavaScript422251888
SVG80169

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity55.67
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods153
▷ Static methods149.15%
▷ Public methods13084.97%
▷ Protected methods2315.03%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants1178.57%
▷ Class constants321.43%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.42MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
whizzie/assets/img/VWThemes_banner_plugin.png18.80KB8.47KB▼ 54.97%
whizzie/assets/img/adminIcon.png6.34KB2.68KB▼ 57.70%
whizzie/assets/img/Customize-Icon.png28.40KB16.13KB▼ 43.19%
whizzie/assets/img/Elementor-Icon.png9.34KB4.22KB▼ 54.84%
whizzie/assets/img/Gutenberg-Icon.png50.22KB19.69KB▼ 60.79%