83% axle-demo-importer

Code Review | Axle Demo Importer

WordPress plugin Axle Demo Importer scored83%from 54 tests.

About plugin

  • Plugin page: axle-demo-importer
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2017
  • Latest release: Sep 20, 2017
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: axlethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /4,117 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.96ms] Passed 4 tests

This is a short check of server-side resources used by Axle Demo Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.48 ▼5.88
Dashboard /wp-admin3.34 ▲0.0449.03 ▼5.34
Posts /wp-admin/edit.php3.45 ▲0.1049.41 ▼5.72
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.64 ▼17.81
Media Library /wp-admin/upload.php3.26 ▲0.0430.19 ▼10.44
Axle Demo Importer /wp-admin/themes.php?page=axle-demo-importer3.2733.81

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Axle Demo Importer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.27 ▼0.131.68 ▼0.0944.67 ▲4.63
Dashboard /wp-admin2,196 ▲195.51 ▼0.0994.87 ▲3.3535.57 ▼7.58
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0641.00 ▲0.5735.85 ▲2.33
Add New Post /wp-admin/post-new.php1,530 ▲223.15 ▲0.17621.97 ▼58.3452.53 ▼8.38
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.0196.85 ▼6.6342.53 ▼5.13
Axle Demo Importer /wp-admin/themes.php?page=axle-demo-importer9022.1324.4130.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/axle-demo-importer/includes/libraries/xml-importer.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/axle-demo-importer/includes/libraries/dat-importer.php on line 203
    • > PHP Fatal error
      Uncaught Error: Call to undefined function axle_demo_importer_get_demo_content_settings() in wp-content/plugins/axle-demo-importer/templates/upload-form.php:8
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/axle-demo-importer/includes/libraries/dat-importer.php on line 203
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-wp-customize-setting.php' (include_path='.:/usr/share/php') in wp-content/plugins/axle-demo-importer/includes/libraries/dat-importer.php on line 203
    • > PHP Warning
      require_once(ABSPATHWPINC/class-wp-customize-setting.php): failed to open stream: No such file or directory in wp-content/plugins/axle-demo-importer/includes/libraries/dat-importer.php on line 203
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/import.php' (include_path='.:/usr/share/php') in wp-content/plugins/axle-demo-importer/includes/libraries/xml-importer.php on line 9
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/import.php): failed to open stream: No such file or directory in wp-content/plugins/axle-demo-importer/includes/libraries/xml-importer.php on line 9

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Importer page) image required
The official readme.txt is a good inspiration

axle-demo-importer/axle-demo-importer.php 85% from 13 tests

"Axle Demo Importer" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,971 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP104617101,971

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity36.27
▷ Minimum class complexity1.00
▷ Maximum class complexity175.00
Average method complexity6.11
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes327.27%
Methods76
▷ Static methods45.26%
▷ Public methods6585.53%
▷ Protected methods11.32%
▷ Private methods1013.16%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin