10% posts-widget-with-tabs

Code Review | Posts widget with tabs

WordPress plugin Posts widget with tabs scored10%from 54 tests.

About plugin

  • Plugin page: posts-widget-with...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.6
  • WordPress version: 6.3.1
  • First release: Aug 18, 2014
  • Latest release: Aug 22, 2016
  • Number of updates: 12
  • Update frequency: every 61.6 days
  • Top authors: WEB4PRO_co (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,311 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/posts-widget-with-tabs/posts_tabs_widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; tabs_widget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼62.82ms] Passed 4 tests

This is a short check of server-side resources used by Posts widget with tabs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.98 ▼36.27
Dashboard /wp-admin2.16 ▼1.185.94 ▼61.56
Posts /wp-admin/edit.php2.16 ▼1.206.74 ▼49.56
Add New Post /wp-admin/post-new.php2.16 ▼3.735.99 ▼103.89
Media Library /wp-admin/upload.php2.16 ▼1.075.65 ▼28.35

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_tabs_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Posts widget with tabs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.131.78 ▲0.1243.70 ▲4.92
Dashboard /wp-admin2,192 ▲185.56 ▼0.0186.30 ▼9.3942.48 ▼1.25
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0135.69 ▼4.5936.04 ▲0.68
Add New Post /wp-admin/post-new.php1,535 ▼817.98 ▼4.95619.24 ▼20.0666.17 ▲16.22
Media Library /wp-admin/upload.php1,403 ▲64.23 ▲0.1394.94 ▼18.0044.49 ▼2.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/posts-widget-with-tabs/posts_tabs_widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; tabs_widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_tabs_widget
    • 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
Good news, no errors were detected

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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/posts-widget-with-tabs/posts_tabs_widget.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: posts, tabs, widget, tabs widget

posts-widget-with-tabs/posts_tabs_widget.php 92% from 13 tests

The entry point to "Posts widget with tabs" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("posts-widget-with-tabs.php" instead of "posts_tabs_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin263 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11011177
CSS10068
JavaScript11018

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) screenshot-1.png14.78KB0.00KB▼ 100.00%
(invalid) screenshot-2.png4.14KB0.00KB▼ 100.00%