84% theme-downloader

Code Review | Theme Downloader

WordPress plugin Theme Downloader scored84%from 54 tests.

About plugin

  • Plugin page: theme-downloader
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9
  • WordPress version: 6.3.1
  • First release: Jun 1, 2013
  • Latest release: Oct 8, 2014
  • Number of updates: 7
  • Update frequency: every 70.6 days
  • Top authors: georgestephanis (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

400+ active /28,353 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.03MB] [CPU: ▼11.40ms] Passed 4 tests

An overview of server-side resources used by Theme Downloader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0544.80 ▲1.67
Dashboard /wp-admin3.38 ▼0.0048.51 ▼15.74
Posts /wp-admin/edit.php3.50 ▲0.1049.62 ▼1.63
Add New Post /wp-admin/post-new.php5.97 ▲0.0489.42 ▼25.16
Media Library /wp-admin/upload.php3.31 ▲0.0439.17 ▼3.05

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Theme Downloader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.29 ▼0.061.70 ▼0.2546.96 ▲2.27
Dashboard /wp-admin2,192 ▲125.54 ▼0.1083.31 ▼6.6339.72 ▼7.66
Posts /wp-admin/edit.php2,100 ▲31.98 ▼0.0434.01 ▼2.0532.95 ▼5.51
Add New Post /wp-admin/post-new.php1,525 ▼123.11 ▲0.20672.81 ▲23.6050.03 ▼0.65
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.07101.26 ▼9.9643.09 ▼5.48

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/theme-downloader/theme-downloader.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === theme-downloader === )
You can take inspiration from this readme.txt

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

The main PHP script in "Theme Downloader" version 1.1.1 is automatically included on every request by WordPress
97 characters long description:
Gives a quick and convenient way to download a theme installed on the current site as a zip file.

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 detected203 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23214203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.50
▷ Minimum class complexity8.00
▷ Maximum class complexity15.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin