84% tabs-widget-popular-posts-and-latest-posts

Code Review | Tabs popular posts and latest posts

WordPress plugin Tabs popular posts and latest posts scored84%from 54 tests.

About plugin

  • Plugin page: tabs-widget-popul...
  • Plugin version: 3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2012
  • Latest release: Dec 1, 2022
  • Number of updates: 28
  • Update frequency: every 130.6 days
  • Top authors: gopiplus@hotmail.com (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /18,356 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Tabs popular posts and latest posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.46 ▲3.11
Dashboard /wp-admin3.35 ▲0.0047.70 ▼11.85
Posts /wp-admin/edit.php3.40 ▲0.0443.72 ▼2.90
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.20 ▼5.56
Media Library /wp-admin/upload.php3.27 ▲0.0436.26 ▲0.56

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
tplp_popular_title
tplp_latest_title
can_compress_scripts
theysaidso_admin_options
tplp_latest_posts
widget_recent-comments
widget_recent-posts
tplp_popular_posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tabs popular posts and latest posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.40 ▼0.978.65 ▲7.1345.47 ▲5.61
Dashboard /wp-admin2,195 ▲205.59 ▲0.0195.00 ▼4.0441.36 ▲1.94
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0538.23 ▲2.8733.67 ▼3.11
Add New Post /wp-admin/post-new.php1,535 ▲918.18 ▼4.90598.99 ▼48.2663.79 ▲10.57
Media Library /wp-admin/upload.php1,394 ▼34.30 ▲0.0797.65 ▼1.9740.89 ▼2.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/tabs-widget-popular-posts-and-latest-posts/tabs-popular-posts-and-latest-posts.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: tabber, plugin, widget

tabs-widget-popular-posts-and-latest-posts/tabs-popular-posts-and-latest-posts.php 85% from 13 tests

The primary PHP file in "Tabs popular posts and latest posts" version 3.9 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tabs-widget-popular-posts-and-latest-posts.php" instead of "tabs-popular-posts-and-latest-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin266 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP23128180
PO File2141857
JavaScript114819
CSS1369
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/ico-hot-grey.png1.69KB0.75KB▼ 55.66%
inc/ico-hot-orange.png1.75KB0.85KB▼ 51.73%
inc/ico-hot-blue.png1.68KB0.76KB▼ 54.85%