84% logo-by-conditions

Code Review | Logo by Conditions

WordPress plugin Logo by Conditions scored84%from 54 tests.

About plugin

  • Plugin page: logo-by-conditions
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 12, 2019
  • Latest release: Jul 15, 2019
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: truser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.76ms] Passed 4 tests

Analyzing server-side resources used by Logo by Conditions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.54 ▼6.36
Dashboard /wp-admin3.34 ▲0.0448.62 ▼2.13
Posts /wp-admin/edit.php3.46 ▲0.1052.58 ▲7.39
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.52 ▼1.93
Media Library /wp-admin/upload.php3.24 ▲0.0244.04 ▲9.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Logo by Conditions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,066 ▲29515.23 ▲0.865.13 ▲3.1836.72 ▼5.18
Dashboard /wp-admin2,366 ▲1786.46 ▲1.59132.88 ▲14.3440.02 ▼5.29
Posts /wp-admin/edit.php2,269 ▲1803.36 ▲1.2155.65 ▲17.4037.07 ▲2.90
Add New Post /wp-admin/post-new.php6,231 ▲4,69418.90 ▲0.81919.39 ▲320.9641.39 ▼11.29
Media Library /wp-admin/upload.php1,405 ▲204.11 ▼0.08124.43 ▲18.4770.55 ▲25.97

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

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
Even though everything seems fine, this is not 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/logo-by-conditions/pages/settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logo-by-conditions/index.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: different logo, logo condition, logo, show different logo

logo-by-conditions/index.php 92% from 13 tests

The primary PHP file in "Logo by Conditions" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("logo-by-conditions.php" instead of "index.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 plugin362 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22820195
CSS1274141
JavaScript22026

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin