88% theme-importer

Code Review | Theme Importer

WordPress plugin Theme Importer scored 88% from 54 tests.

About plugin

  • Plugin page: theme-importer
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.3
  • WordPress version: 5.8.1
  • First release: Jul 21, 2015
  • Latest release: Jul 21, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Steve Forster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,675 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼143.20ms] Passed 4 tests

This is a short check of server-side resources used by Theme Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1444.29 ▲15.81
Dashboard /wp-admin3.09 ▲0.0356.36 ▼4.93
Posts /wp-admin/edit.php3.14 ▲0.0356.65 ▲0.81
Add New Post /wp-admin/post-new.php5.44 ▲0.0197.71 ▼571.20
Media Library /wp-admin/upload.php3.03 ▲0.0339.65 ▲2.53
Importer /wp-admin/themes.php?page=theme-importer/theme-importer.php2.9834.19

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Theme Importer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.83 ▲0.2611.16 ▼0.6549.87 ▼8.20
Dashboard /wp-admin2,972 ▲415.91 ▼0.04169.40 ▼13.50123.16 ▲0.96
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0178.10 ▲3.91100.39 ▲9.63
Add New Post /wp-admin/post-new.php1,618 ▼6521.43 ▲3.03343.46 ▼60.25120.65 ▲3.30
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.01165.09 ▼13.95129.66 ▲1.13
Importer /wp-admin/themes.php?page=theme-importer/theme-importer.php1,0952.0960.7692.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/themes.php?page=theme-importer/theme-importer.php
    • > Notice in wp-content/plugins/theme-importer/theme-importer.php+125
    Undefined index: id

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/theme-importer/theme-importer.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Visit http://www.stevs.net/plugins/theme-importer/) image missing
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

theme-importer/theme-importer.php Passed 13 tests

The main PHP script in "Theme Importer" version 1.0 is automatically included on every request by WordPress
61 characters long description:
Install themes from remote locations into your themes folder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected157 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1713157

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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