89% duplicate-theme

Code Review | Duplicate Theme

WordPress plugin Duplicate Theme scored89%from 54 tests.

About plugin

  • Plugin page: duplicate-theme
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Oct 17, 2013
  • Latest release: Nov 15, 2013
  • Number of updates: 15
  • Update frequency: every 1.9 days
  • Top authors: Muller Digital (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /31,329 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
Install script ran successfully

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

An overview of server-side resources used by Duplicate Theme
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0243.35 ▲0.38
Dashboard /wp-admin3.33 ▲0.0354.39 ▲3.49
Posts /wp-admin/edit.php3.39 ▲0.0257.65 ▲2.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0291.57 ▼6.46
Media Library /wp-admin/upload.php3.26 ▲0.0245.45 ▲6.17
Duplicate Theme /wp-admin/themes.php?page=duplicatetheme3.2435.83

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Duplicate Theme
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.16 ▼0.481.90 ▲0.2444.44 ▼1.01
Dashboard /wp-admin2,199 ▲225.56 ▼0.0591.79 ▼3.0239.27 ▼2.35
Posts /wp-admin/edit.php2,107 ▲42.01 ▼0.0239.96 ▼1.7937.49 ▼1.69
Add New Post /wp-admin/post-new.php1,529 ▲323.47 ▲0.68647.91 ▼59.7354.00 ▼3.37
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.03112.61 ▼3.7543.14 ▼14.73
Duplicate Theme /wp-admin/themes.php?page=duplicatetheme8821.7028.4330.59

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (Appearance -> Duplicate Theme), #2 (Network -> Themes -> Duplicate Theme)
The official readme.txt is a good inspiration

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

Analyzing the main PHP file in "Duplicate Theme" version 0.1.6
83 characters long description:
Choose an existing theme, duplicate it or create a child while giving it a new name

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
Success! There were no dangerous files found in this plugin154 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26232154

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.59KB5.51KB▼ 1.52%
screenshot-2.png7.39KB7.27KB▼ 1.73%