90% theme-logic

Code Review | Theme Logic

WordPress plugin Theme Logic scored90%from 54 tests.

About plugin

  • Plugin page: theme-logic
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Mar 21, 2013
  • Latest release: Apr 21, 2023
  • Number of updates: 27
  • Update frequency: every 136.4 days
  • Top authors: shazdeh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,335 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.70ms] Passed 4 tests

A check of server-side resources used by Theme Logic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.44 ▼0.54
Dashboard /wp-admin3.31 ▲0.0050.37 ▼0.02
Posts /wp-admin/edit.php3.36 ▲0.0046.12 ▼1.53
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.15 ▼8.24
Media Library /wp-admin/upload.php3.23 ▲0.0035.37 ▼0.49

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Theme Logic
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.42 ▲0.071.73 ▼0.3143.49 ▲2.10
Dashboard /wp-admin2,189 ▲125.48 ▼0.1487.82 ▼3.2136.90 ▼4.36
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0035.80 ▲0.1530.51 ▼4.31
Add New Post /wp-admin/post-new.php1,528 ▼923.31 ▲5.00767.36 ▲156.1354.79 ▼10.56
Media Library /wp-admin/upload.php1,397 ▼64.20 ▼0.0295.41 ▼6.9039.96 ▼4.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: theme, context, conditional-tags, logic

theme-logic/init.php 92% from 13 tests

Analyzing the main PHP file in "Theme Logic" version 0.5
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("theme-logic.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1 line of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1181

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected