83% all-in-one-demo-importexport

Code Review | All in one demo Export/Import

WordPress plugin All in one demo Export/Import scored83%from 54 tests.

About plugin

  • Plugin page: all-in-one-demo-i...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Dec 22, 2017
  • Latest release: Dec 26, 2017
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: codexdemon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.28ms] Passed 4 tests

A check of server-side resources used by All in one demo Export/Import
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1241.76 ▼1.02
Dashboard /wp-admin3.47 ▲0.0849.66 ▼17.30
Posts /wp-admin/edit.php3.58 ▲0.1852.93 ▲0.64
Add New Post /wp-admin/post-new.php6.05 ▲0.1290.02 ▼7.42
Media Library /wp-admin/upload.php3.39 ▲0.1241.84 ▲3.23

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for All in one demo Export/Import
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.36 ▲0.011.74 ▲0.0345.57 ▲1.08
Dashboard /wp-admin2,192 ▲125.57 ▼0.1091.57 ▼6.8041.31 ▼1.07
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0340.68 ▲6.5235.85 ▼2.29
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▲0.21700.24 ▼11.1858.34 ▲7.03
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0196.38 ▼14.6140.54 ▼2.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • 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
Good news, no errors were detected

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
Please fix the following
  • 4× 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/all-in-one-demo-importexport/all-in-one-demo-import-export.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/all-in-one-demo-importexport/classes/class-aiodie-option.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/all-in-one-demo-importexport/classes/class-aiodie-control.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/all-in-one-demo-importexport/includes/control.php:34

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 on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The export/import customizer section.), #2 (Process Import Export by selecting details options)
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

all-in-one-demo-importexport/all-in-one-demo-import-export.php 77% from 13 tests

This is the main PHP file of "All in one demo Export/Import" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("all-in-one-demo-importexport.php" instead of "all-in-one-demo-import-export.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 157 characters long)

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
Good job! No executable or dangerous file extensions detected1,197 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP51762281,097
JavaScript118466
CSS10025
Markdown1909

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity43.33
▷ Minimum class complexity1.00
▷ Maximum class complexity128.00
Average method complexity11.58
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
Methods12
▷ Static methods1083.33%
▷ Public methods650.00%
▷ Protected methods18.33%
▷ Private methods541.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.06MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.95KB33.37KB▼ 1.69%
screenshot-2.png27.25KB26.20KB▼ 3.84%