83% tkc-sliced-post

Code Review | TKC Sliced Post Helper

WordPress plugin TKC Sliced Post Helper scored83%from 54 tests.

About plugin

  • Plugin page: tkc-sliced-post
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Mar 7, 2020
  • Number of updates: 9
  • Update frequency: every 132.8 days
  • Top authors: thinh.pham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /468 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 successfully, without throwing any errors or notices

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

Server-side resources used by TKC Sliced Post Helper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.42 ▼3.27
Dashboard /wp-admin3.31 ▲0.0149.35 ▼0.33
Posts /wp-admin/edit.php3.36 ▲0.0049.26 ▼0.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.76 ▼11.00
Media Library /wp-admin/upload.php3.23 ▲0.0038.95 ▲4.43

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

TKC Sliced Post Helper: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.64 ▲0.252.13 ▲0.3444.49 ▼4.97
Dashboard /wp-admin2,195 ▲215.62 ▼0.0983.98 ▼12.2839.94 ▲0.62
Posts /wp-admin/edit.php2,097 ▼32.05 ▼0.0037.39 ▼4.8236.70 ▼1.97
Add New Post /wp-admin/post-new.php1,545 ▼023.34 ▲0.34664.79 ▲46.0757.26 ▲8.39
Media Library /wp-admin/upload.php1,397 ▼04.22 ▼0.06100.68 ▼6.5445.87 ▼2.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tkc-sliced-post/tkc-sliced-post.php:17

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 90% from 29 tests

readme.txt 88% 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:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === tkc-sliced-post === )
  • Screenshots: A description for screenshot #1 is missing in tkc-sliced-post/assets to your readme.txt
The official readme.txt might help

tkc-sliced-post/tkc-sliced-post.php 92% from 13 tests

The main PHP script in "TKC Sliced Post Helper" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected29 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11015
PHP141214

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png59.94KB26.81KB▼ 55.28%
tkc-sliced-post.png0.28KB0.29KB0.00%