72% novarum-json-importer

Code Review | Novarum Importer

WordPress plugin Novarum Importer scored72%from 54 tests.

About plugin

  • Plugin page: novarum-json-impo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 5, 2018
  • Latest release: Dec 12, 2018
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: novarum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /660 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.19ms] Passed 4 tests

This is a short check of server-side resources used by Novarum Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.42 ▲2.58
Dashboard /wp-admin3.40 ▲0.0952.38 ▼2.90
Posts /wp-admin/edit.php3.51 ▲0.1551.61 ▼0.21
Add New Post /wp-admin/post-new.php6.00 ▲0.1185.13 ▼10.98
Media Library /wp-admin/upload.php3.32 ▲0.0937.83 ▲1.33
Novarum Importer /wp-admin/options-general.php?page=Novarumimporter_settings3.2632.57

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Novarum Importer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.71 ▼0.869.18 ▲7.2744.53 ▼0.94
Dashboard /wp-admin2,203 ▲235.65 ▼0.0194.99 ▲7.5342.49 ▼3.95
Posts /wp-admin/edit.php2,108 ▲82.02 ▲0.0338.61 ▲0.7935.80 ▲0.88
Add New Post /wp-admin/post-new.php1,537 ▲922.67 ▼0.22633.89 ▼75.0356.01 ▼6.23
Media Library /wp-admin/upload.php1,408 ▲84.30 ▲0.08104.08 ▼9.8645.74 ▼1.43
Novarum Importer /wp-admin/options-general.php?page=Novarumimporter_settings9312.0121.7522.59

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=Novarumimporter_settings
    • > Notice in wp-content/plugins/novarum-json-importer/admin/class-novarumimporter-admin.php+123
    Undefined variable: active_tab
    • > GET request to /wp-admin/options-general.php?page=Novarumimporter_settings
    • > Notice in wp-content/plugins/novarum-json-importer/admin/partials/novarumimporter-admin-request.php+38
    Undefined index: ni_settings_fields

SRP 0% 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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/novarum-json-importer/admin/partials/novarumimporter-admin-display.php
    • > /wp-content/plugins/novarum-json-importer/public/partials/novarumimporter-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/novarum-json-importer/admin/partials/novarumimporter-admin-request.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/novarum-json-importer/admin/partials/novarumimporter-admin-response.php:20

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: rest api, json, import

novarum-json-importer/novarumimporter.php 85% from 13 tests

The primary PHP file in "Novarum Importer" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("novarum-json-importer.php" instead of "novarumimporter.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected564 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14250560531
JavaScript2155525
CSS2288

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.14
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin