84% show-post-content-anywhere

Code Review | Show Post Content Anywhere

WordPress plugin Show Post Content Anywhere scored84%from 54 tests.

About plugin

  • Plugin page: show-post-content...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 8, 2018
  • Latest release: Jul 10, 2018
  • Number of updates: 4
  • Update frequency: every 13.0 days
  • Top authors: nur1952 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /531 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
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Show Post Content Anywhere
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.80 ▼7.04
Dashboard /wp-admin3.31 ▼0.0343.62 ▼21.58
Posts /wp-admin/edit.php3.36 ▲0.0145.33 ▼3.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.92 ▼14.17
Media Library /wp-admin/upload.php3.24 ▲0.0131.42 ▼1.96

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Show Post Content Anywhere
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.371.76 ▲0.1038.05 ▲0.37
Dashboard /wp-admin2,206 ▲184.83 ▼1.07107.20 ▼8.7738.02 ▼7.67
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0339.61 ▲0.9635.94 ▼0.19
Add New Post /wp-admin/post-new.php1,534 ▲1723.26 ▲5.50692.80 ▲52.6252.32 ▼3.82
Media Library /wp-admin/upload.php1,382 ▼94.32 ▲0.0993.92 ▼11.2943.39 ▲2.03

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just 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_shortcode() in wp-content/plugins/show-post-content-anywhere/show-post-content-anywhere.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
3 plugin tags: post content, post, meta field

show-post-content-anywhere/show-post-content-anywhere.php Passed 13 tests

The primary PHP file in "Show Post Content Anywhere" version 1.0 is used by WordPress to initiate all plugin functionality
58 characters long description:
A plugin that shows any page, post, or meta field content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12934

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png3.30KB1.50KB▼ 54.41%
assets/icon-128x128.png1.75KB0.76KB▼ 56.54%
assets/banner-772x250.png7.84KB4.53KB▼ 42.21%