84% this-or-that

Code Review | This-or-That

WordPress plugin This-or-That scored 84% from 54 tests.

About plugin

  • Plugin page: this-or-that
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-4.1
  • WordPress version: 6.3.1
  • First release: Nov 2, 2013
  • Latest release: Jan 9, 2015
  • Number of updates: 13
  • Update frequency: every 33.5 days
  • Top authors: andrex84 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

50+ active / 4,978 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.03ms] Passed 4 tests

Server-side resources used by This-or-That
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1234.91 ▼8.11
Dashboard /wp-admin3.41 ▲0.1144.76 ▲0.24
Posts /wp-admin/edit.php3.53 ▲0.1749.50 ▲6.13
Add New Post /wp-admin/post-new.php5.99 ▲0.1180.26 ▼10.30
Media Library /wp-admin/upload.php3.34 ▲0.1138.33 ▲6.05
Add item /wp-admin/post-new.php?post_type=this-or-that3.4647.42
All items /wp-admin/edit.php?post_type=this-or-that3.3840.71
Categories /wp-admin/edit-tags.php?taxonomy=thisorthat_category&post_type=this-or-that3.3331.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for This-or-That
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲22113.62 ▼0.756.41 ▲3.4641.74 ▼3.81
Dashboard /wp-admin2,241 ▲535.87 ▲0.97111.50 ▲6.5843.60 ▼5.94
Posts /wp-admin/edit.php2,130 ▲412.00 ▼0.1341.45 ▲1.4835.79 ▲1.38
Add New Post /wp-admin/post-new.php1,579 ▲5518.11 ▼4.89611.03 ▼18.1568.33 ▲16.02
Media Library /wp-admin/upload.php1,426 ▲354.23 ▲0.0394.23 ▼5.2239.99 ▼3.96
Add item /wp-admin/post-new.php?post_type=this-or-that2,4647.88187.2371.18
All items /wp-admin/edit.php?post_type=this-or-that1,2001.9630.6631.66
Categories /wp-admin/edit-tags.php?taxonomy=thisorthat_category&post_type=this-or-that1,2752.1426.4626.37

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/this-or-that/this-or-that.php:36

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

this-or-that/this-or-that.php 92% from 13 tests

The main PHP file in "This-or-That" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected551 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1266.67%
▷ Protected methods633.33%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon-adminmenu16-sprite.png2.25KB1.28KB▼ 43.22%
img/seperat_or.png1.95KB0.58KB▼ 70.23%
img/icon-adminpage32.png2.52KB1.51KB▼ 39.83%
img/icon-adminpage32_2x.png7.82KB3.13KB▼ 60.02%
img/icon-adminmenu16-sprite_2x.png4.25KB2.08KB▼ 50.99%