78% cherittos-importer

Code Review | Cheritto's Importer

WordPress plugin Cheritto's Importer scored78%from 54 tests.

About plugin

  • Plugin page: cherittos-importer
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 9, 2022
  • Latest release: Jul 9, 2022
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: cheritto (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /398 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.31MB] [CPU: ▼2.85ms] Passed 4 tests

Server-side resources used by Cheritto's Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3137.73 ▼1.89
Dashboard /wp-admin3.62 ▲0.2852.71 ▼7.38
Posts /wp-admin/edit.php3.74 ▲0.3849.70 ▲7.96
Add New Post /wp-admin/post-new.php6.20 ▲0.3294.32 ▼1.85
Media Library /wp-admin/upload.php3.55 ▲0.3237.33 ▼0.26

Server storage [IO: ▲0.13MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 11 new files
Database: 18 new tables, 6 new options
New tables
wp_cherittoimp_keepalives
wp_cherittoimp_temp_terms_tax
wp_cherittoimp_old_and_new_term_taxonomy_id_rjoin
wp_cherittoimp_comments
wp_cherittoimp_postmeta
wp_cherittoimp_term_relationships
wp_cherittoimp_termmeta
wp_cherittoimp_old_and_new_term_taxonomy_id
wp_cherittoimp_term_taxonomy
wp_cherittoimp_usermeta
...
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cheritto's Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.21 ▼1.471.91 ▲0.0941.01 ▼3.11
Dashboard /wp-admin2,215 ▲275.77 ▲0.9196.97 ▼19.7039.23 ▼8.27
Posts /wp-admin/edit.php2,104 ▲152.01 ▼0.0639.72 ▼2.5636.90 ▼1.41
Add New Post /wp-admin/post-new.php1,552 ▲2418.72 ▲0.26601.61 ▼24.4456.21 ▲5.75
Media Library /wp-admin/upload.php1,397 ▲154.19 ▼0.0595.92 ▼3.6941.07 ▼3.70

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cherittos-importer/includes/up.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cherittos-importer/includes/import.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cherittos-importer/includes/class-cheritto-wordpress-importer.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: wxr import, import, xml import, wxr importer, importer...

cherittos-importer/cherittos-wordpress-importer.php 92% from 13 tests

The main PHP file in "Cheritto's Importer" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cherittos-importer.php" instead of "cherittos-wordpress-importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,878 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP86373341,643
JavaScript1375154
CSS117081

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity30.60
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity5.48
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods2369.70%
▷ Protected methods1030.30%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin