77% ovic-import-demo

Code Review | Ovic Importer

WordPress plugin Ovic Importer scored77%from 54 tests.

About plugin

  • Plugin page: ovic-import-demo
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jun 3, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 76
  • Update frequency: every 21.4 days
  • Top authors: hoangkhanh92 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active /67,604 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.81ms] Passed 4 tests

This is a short check of server-side resources used by Ovic Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.00 ▼5.11
Dashboard /wp-admin3.42 ▲0.0745.95 ▼17.49
Posts /wp-admin/edit.php3.47 ▲0.1150.12 ▲3.13
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.56 ▲1.00
Media Library /wp-admin/upload.php3.28 ▲0.0533.81 ▼1.62
Ovic Import Demo /wp-admin/admin.php?page=ovic-import3.2533.39
Ovic Plugins /wp-admin/admin.php?page=ovic-plugins3.2431.65

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Ovic Importer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6514.67 ▲0.281.46 ▼0.2340.28 ▼3.96
Dashboard /wp-admin2,220 ▲395.65 ▼0.2790.74 ▼12.1569.90 ▲24.47
Posts /wp-admin/edit.php2,125 ▲222.10 ▲0.1039.50 ▲5.8037.04 ▲1.07
Add New Post /wp-admin/post-new.php1,559 ▲3323.30 ▲0.28591.12 ▼98.02181.00 ▲113.23
Media Library /wp-admin/upload.php1,422 ▲254.19 ▲0.0894.74 ▼16.4773.19 ▲23.69
Ovic Import Demo /wp-admin/admin.php?page=ovic-import1,0452.0324.0938.14
Ovic Plugins /wp-admin/admin.php?page=ovic-plugins8172.0023.8924.20

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ovic-import-demo/includes/classes/importer.php
    • > /wp-content/plugins/ovic-import-demo/includes/classes/revslider-export.php
    • > /wp-content/plugins/ovic-import-demo/includes/classes/database.php
    • > /wp-content/plugins/ovic-import-demo/includes/classes/image.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Importer' not found in wp-content/plugins/ovic-import-demo/includes/vendor/class-wp-import.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: Please take inspiration from this readme.txt

ovic-import-demo/addon.php 85% from 13 tests

The primary PHP file in "Ovic Importer" version 1.6.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ovic-import-demo.php" instead of "addon.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin7,361 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,0861,5656,172
CSS2833691
JavaScript4960498

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 144)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity66.05
▷ Minimum class complexity1.00
▷ Maximum class complexity229.00
Average method complexity6.43
▷ Minimum method complexity1.00
▷ Maximum method complexity144.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods223
▷ Static methods4721.08%
▷ Public methods21696.86%
▷ Protected methods52.24%
▷ Private methods20.90%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants11
▷ Global constants1090.91%
▷ Class constants19.09%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-menu.png1.11KB0.37KB▼ 66.43%