79% cm4all-wp-impex

Code Review | cm4all-wp-impex

WordPress plugin cm4all-wp-impex scored 79% from 54 tests.

About plugin

  • Plugin page: cm4all-wp-impex
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9
  • WordPress version: 5.9.2
  • First release: Feb 2, 2022
  • Latest release: Mar 24, 2022
  • Number of updates: 9
  • Update frequency: every 6.2 days
  • Top authors: cm4all (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 211 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.16MB] [CPU: ▼292.96ms] Passed 4 tests

An overview of server-side resources used by cm4all-wp-impex
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2356.53 ▲7.85
Dashboard /wp-admin3.58 ▲0.1733.35 ▼0.64
Posts /wp-admin/edit.php3.80 ▲0.1635.69 ▼2.20
Add New Post /wp-admin/post-new.php7.10 ▲0.1392.46 ▼1,169.30
Media Library /wp-admin/upload.php3.46 ▲0.1725.31 ▲0.31
Impex /wp-admin/tools.php?page=cm4all_wp_impex_wp_admin_dashboard5.7033.32

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 59 new files
Database: 1 new table, 1 new option
New tables
wp_impex_snapshots
New WordPress options
impex_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for cm4all-wp-impex
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,798 ▲4415.85 ▲0.266.20 ▲0.412.88 ▲0.16
Dashboard /wp-admin2,895 ▲346.13 ▼0.08117.29 ▼16.78156.51 ▼7.64
Posts /wp-admin/edit.php2,694 ▲33.22 ▼0.0163.39 ▲0.95141.38 ▼7.91
Add New Post /wp-admin/post-new.php1,759 ▲6921.35 ▼0.05447.03 ▼8.39161.68 ▼2.85
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.01152.39 ▲10.02189.36 ▲6.39
Impex /wp-admin/tools.php?page=cm4all_wp_impex_wp_admin_dashboard1,3799.43208.88133.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_impex_snapshots
  • This plugin does not fully uninstall, leaving 1 option in the database
    • impex_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #2 (This is the second screen shot) image missing
The official readme.txt is a good inspiration

cm4all-wp-impex/plugin.php 92% from 13 tests

Analyzing the main PHP file in "cm4all-wp-impex" version 1.2.1
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cm4all-wp-impex.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected5,247 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP408848943,636
JavaScript1244611,459
JSON100111
CSS30441

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.28
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces8
Interfaces10
Traits2
Classes27
▷ Abstract classes1555.56%
▷ Concrete classes1244.44%
▷ Final classes00.00%
Methods149
▷ Static methods53.36%
▷ Public methods12885.91%
▷ Protected methods2114.09%
▷ Private methods00.00%
Functions82
▷ Named functions4554.88%
▷ Anonymous functions3745.12%
Constants149
▷ Global constants10.67%
▷ Class constants14899.33%
▷ Public constants148100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin