94% show-content-only

Code Review | Show Content Only

WordPress plugin Show Content Only scored 94% from 54 tests.

About plugin

  • Plugin page: show-content-only
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.0
  • WordPress version: 5.8.1
  • First release: Feb 16, 2010
  • Latest release: Sep 17, 2014
  • Number of updates: 28
  • Update frequency: every 59.9 days
  • Top authors: katzwebdesign (89.29%)BrashRebel (14.29%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active / 9,332 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Show Content Only
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1529.12 ▲6.08
Dashboard /wp-admin3.10 ▲0.0452.93 ▲8.08
Posts /wp-admin/edit.php3.15 ▲0.0446.48 ▲0.39
Add New Post /wp-admin/post-new.php5.45 ▲0.0289.62 ▼567.62
Media Library /wp-admin/upload.php3.04 ▲0.0433.71 ▼4.18

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Show Content Only
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.98 ▲0.429.36 ▼0.3647.87 ▼1.36
Dashboard /wp-admin2,973 ▲426.02 ▲0.06130.83 ▼18.74102.77 ▼7.27
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0063.14 ▼3.8986.29 ▼6.88
Add New Post /wp-admin/post-new.php1,924 ▲24119.07 ▲0.94387.11 ▲9.62130.92 ▲26.50
Media Library /wp-admin/upload.php1,810 ▲35.03 ▼0.00150.47 ▲6.52123.27 ▲2.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-content-only/content-only.php:32

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 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
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

show-content-only/content-only.php 92% from 13 tests

The main PHP file in "Show Content Only" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("show-content-only.php" instead of "content-only.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
Good job! No executable or dangerous file extensions detected200 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12944163
PO File18837

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity5.43
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin