84% confirm-theme-structure

Code Review | Confirm Theme Structure

WordPress plugin Confirm Theme Structure scored84%from 54 tests.

About plugin

  • Plugin page: confirm-theme-str...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2018
  • Latest release: Jun 15, 2023
  • Number of updates: 178
  • Update frequency: every 9.4 days
  • Top authors: r3098 (97.75%)ts51 (2.81%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,978 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.78ms] Passed 4 tests

An overview of server-side resources used by Confirm Theme Structure
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.53 ▼2.47
Dashboard /wp-admin3.34 ▲0.0350.43 ▼0.52
Posts /wp-admin/edit.php3.39 ▲0.0352.12 ▼0.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.69 ▲1.94
Media Library /wp-admin/upload.php3.26 ▲0.0337.01 ▲0.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Confirm Theme Structure
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,007 ▲24613.76 ▼0.368.94 ▲7.1337.20 ▼12.31
Dashboard /wp-admin2,198 ▲215.62 ▲0.0491.77 ▼11.6341.20 ▼2.27
Posts /wp-admin/edit.php2,100 ▼02.09 ▲0.1538.59 ▲0.3636.27 ▲0.10
Add New Post /wp-admin/post-new.php1,535 ▼218.17 ▼0.17606.63 ▼21.8763.56 ▲2.67
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.01102.64 ▲6.0444.60 ▼2.16

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/confirm-theme-structure/confirm-theme-structure.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
8 plugin tags: woocommerce, theme, check, codec, managemen...

confirm-theme-structure/confirm-theme-structure.php Passed 13 tests

The main PHP script in "Confirm Theme Structure" version 2.1.1 is automatically included on every request by WordPress
78 characters long description:
A simple plugin that can display a list of templates used to display WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected189 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11228173
JavaScript12016

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
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 functions00.00%
▷ Anonymous functions4100.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin