84% download-theme

Code Review | Download Theme

WordPress plugin Download Theme scored84%from 54 tests.

About plugin

  • Plugin page: download-theme
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2016
  • Latest release: Apr 4, 2023
  • Number of updates: 45
  • Update frequency: every 57.5 days
  • Top authors: IndiaSan (46.67%)metagauss (40%)cmshelplive (15.56%)profilegrid0 (4.44%)

Code review

54 tests

User reviews

7 reviews

Install metrics

4,000+ active /96,358 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.01MB] [CPU: ▼7.37ms] Passed 4 tests

Server-side resources used by Download Theme
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.32 ▼3.69
Dashboard /wp-admin3.33 ▼0.0250.57 ▼14.27
Posts /wp-admin/edit.php3.38 ▲0.0252.50 ▲3.60
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.33 ▼14.45
Media Library /wp-admin/upload.php3.25 ▲0.0240.31 ▲2.95

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

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

Browser metrics Passed 4 tests

Download Theme: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.21 ▼1.171.68 ▼0.6241.92 ▼0.77
Dashboard /wp-admin2,224 ▲185.90 ▲1.0098.49 ▼6.5738.47 ▼3.96
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0639.74 ▲3.5838.02 ▲2.48
Add New Post /wp-admin/post-new.php1,526 ▼017.67 ▲0.20687.19 ▲3.7454.08 ▲3.50
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.04100.06 ▼6.6444.43 ▼0.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/download-theme/download-theme.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/download-theme/download-theme-popup.php:18

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

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

The main file in "Download Theme" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
Download any theme from your wordpress admin panel's Appearance page by just one click!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected320 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS23211165
PHP33743115
JavaScript215840

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Constants4
▷ Global constants4100.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
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/slide-1.png80.47KB30.27KB▼ 62.38%