84% theme-catalog

Code Review | Theme Catalog

WordPress plugin Theme Catalog scored84%from 54 tests.

About plugin

  • Plugin page: theme-catalog
  • Plugin version: 0.02
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2
  • WordPress version: 6.3.1
  • First release: Aug 20, 2015
  • Latest release: Aug 21, 2015
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: trex005 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,417 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼11.37ms] Passed 4 tests

This is a short check of server-side resources used by Theme Catalog
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.99 ▼4.02
Dashboard /wp-admin3.37 ▲0.0347.35 ▼15.90
Posts /wp-admin/edit.php3.48 ▲0.1350.17 ▼2.48
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.99 ▼23.07
Media Library /wp-admin/upload.php3.29 ▲0.0635.86 ▼0.76
Theme Catalog /wp-admin/options-general.php?page=theme_catalog_options3.2635.72

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Theme Catalog
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.69 ▲0.421.66 ▼0.3145.15 ▲2.62
Dashboard /wp-admin2,199 ▲195.56 ▼0.0492.93 ▲4.9537.83 ▼8.47
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0541.56 ▲1.7835.66 ▼0.21
Add New Post /wp-admin/post-new.php1,530 ▲321.95 ▼1.22616.25 ▼4.8149.88 ▼10.69
Media Library /wp-admin/upload.php1,401 ▲14.36 ▲0.19101.04 ▲7.0744.30 ▼1.32
Theme Catalog /wp-admin/options-general.php?page=theme_catalog_options8312.0027.0727.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/theme-catalog/theme-catalog.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: themes, picker, catalog, menus, widget...

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

The entry point to "Theme Catalog" version 0.02 is a PHP file that has certain tags in its header comment area
103 characters long description:
Attractive front-end theme switcher/preview allowing demo of all themes, with menu and widget handling.

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 plugin335 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1322334
JavaScript1011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
1 PNG file occupies 0.36MB with 0.25MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png369.78KB109.67KB▼ 70.34%