83% tkc-posts-selected-widget

Code Review | TKC Posts Selected Widget

WordPress plugin TKC Posts Selected Widget scored 83% from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲0.36ms] Passed 4 tests

A check of server-side resources used by TKC Posts Selected Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.41 ▲1.84
Dashboard /wp-admin3.32 ▲0.0155.76 ▲4.48
Posts /wp-admin/edit.php3.37 ▲0.0149.94 ▲1.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.01 ▼2.38
Media Library /wp-admin/upload.php3.24 ▲0.0140.49 ▲0.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by TKC Posts Selected Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1313.24 ▲0.021.82 ▲0.0641.28 ▼2.78
Dashboard /wp-admin2,203 ▼65.79 ▼0.07104.30 ▲4.6447.79 ▲6.90
Posts /wp-admin/edit.php2,089 ▼01.98 ▲0.0141.28 ▲6.7536.42 ▲6.08
Add New Post /wp-admin/post-new.php1,514 ▼1917.77 ▼5.70679.06 ▲80.9059.30 ▲9.29
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.02107.27 ▼6.3846.36 ▼1.03

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please 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-posts-selected-widget/tkc-posts-selected.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === tkc-posts-selected-widget === )
The official readme.txt might help

tkc-posts-selected-widget/tkc-posts-selected.php 85% from 13 tests

"TKC Posts Selected Widget" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tkc-posts-selected-widget.php" instead of "tkc-posts-selected.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
Success! There were no dangerous files found in this plugin191 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13444190
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.PNG25.50KB8.92KB▼ 65.05%
screenshot-2.PNG30.27KB11.52KB▼ 61.95%
images/placeholder-small.png1.89KB0.08KB▼ 95.50%
screenshot-1.PNG9.73KB4.69KB▼ 51.84%