90% json-importer

Code Review | Wordpress Json importer

WordPress plugin Wordpress Json importer scored90%from 54 tests.

About plugin

  • Plugin page: json-importer
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2
  • WordPress version: 6.3.1
  • First release: Sep 12, 2015
  • Latest release: Sep 12, 2015
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: mahdimajidzadeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,347 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.00ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Json importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.20 ▼2.95
Dashboard /wp-admin3.31 ▲0.0144.34 ▼2.79
Posts /wp-admin/edit.php3.36 ▲0.0145.37 ▲1.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.03 ▲0.48
Media Library /wp-admin/upload.php3.23 ▲0.0035.16 ▲2.99
Json importer /wp-admin/options-general.php?page=wpji_settings3.2028.90
/wp-admin/options-general.php?page=wpji_done3.2028.98

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wordpress Json importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.21 ▼1.171.71 ▼0.2739.41 ▼5.18
Dashboard /wp-admin2,213 ▲224.83 ▼0.08109.43 ▼2.3341.64 ▲1.60
Posts /wp-admin/edit.php2,096 ▲42.01 ▼0.0340.29 ▼2.5836.74 ▲2.33
Add New Post /wp-admin/post-new.php1,538 ▼423.32 ▲5.43675.47 ▲25.4161.65 ▲12.75
Media Library /wp-admin/upload.php1,389 ▲14.19 ▼0.0499.09 ▲3.0141.99 ▼0.48
Json importer /wp-admin/options-general.php?page=wpji_settings8122.1824.4228.00
/wp-admin/options-general.php?page=wpji_done7582.0525.4421.75

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: webservice, json, import

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

The principal PHP file in "Wordpress Json importer" v. 0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("json-importer.php" instead of "wordpress-json-importer.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
Success! There were no dangerous files found in this plugin68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1174468

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin