94% wm-options-import-export

Code Review | WM Options Import Export

WordPress plugin WM Options Import Export scored 94% from 54 tests.

About plugin

  • Plugin page: wm-options-import...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 5.8.1
  • First release: Nov 17, 2015
  • Latest release: Jan 3, 2016
  • Number of updates: 3
  • Update frequency: every 15.7 days
  • Top authors: webmumbai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,154 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼140.27ms] Passed 4 tests

This is a short check of server-side resources used by WM Options Import Export
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0039.11 ▲9.29
Dashboard /wp-admin3.07 ▲0.0142.55 ▼2.07
Posts /wp-admin/edit.php3.12 ▲0.0139.44 ▼5.16
Add New Post /wp-admin/post-new.php5.43 ▲0.0087.25 ▼556.72
Media Library /wp-admin/upload.php3.01 ▲0.0041.20 ▲2.86
Export Options /wp-admin/tools.php?page=wmwpoie_export3.0631.19

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WM Options Import Export
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.82 ▲0.198.24 ▼0.5448.17 ▼0.84
Dashboard /wp-admin2,997 ▲665.94 ▲0.01144.72 ▲3.86102.72 ▼13.82
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0165.23 ▲1.3290.55 ▲3.61
Add New Post /wp-admin/post-new.php1,686 ▲1414.25 ▼4.61383.94 ▲24.37115.12 ▲8.85
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.01158.92 ▲6.51135.21 ▲13.41
Export Options /wp-admin/tools.php?page=wmwpoie_export1,7772.3457.9171.90

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wm-options-import-export/wm_wpoie.php:22

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Wordpress Admin page for export options), #2 (Wordpress Admin page for import options)
Please take inspiration from this readme.txt

wm-options-import-export/wm_wpoie.php 92% from 13 tests

"WM Options Import Export" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wm-options-import-export.php" instead of "wm_wpoie.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin475 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP411635454
JavaScript15021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.75
▷ Minimum class complexity3.00
▷ Maximum class complexity38.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2273.33%
▷ Protected methods00.00%
▷ Private methods826.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin