10% latest-posts-with-thumbnails-and-ads

Code Review | Latest Posts With Thumbnails and Ads

WordPress plugin Latest Posts With Thumbnails and Ads scored10%from 54 tests.

About plugin

  • Plugin page: latest-posts-with...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.5
  • WordPress version: 6.3.1
  • First release: Jul 9, 2015
  • Latest release: Apr 20, 2016
  • Number of updates: 16
  • Update frequency: every 17.9 days
  • Top authors: emilushi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,361 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/latest-posts-with-thumbnails-and-ads/latest-posts.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; shomtek_latest_posts has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼55.39ms] Passed 4 tests

A check of server-side resources used by Latest Posts With Thumbnails and Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.52 ▼34.05
Dashboard /wp-admin2.17 ▼1.185.83 ▼56.04
Posts /wp-admin/edit.php2.17 ▼1.195.67 ▼39.29
Add New Post /wp-admin/post-new.php2.17 ▼3.725.52 ▼92.19
Media Library /wp-admin/upload.php2.17 ▼1.066.11 ▼29.85

Server storage [IO: ▲0.39MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_shomtek_latest_posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Latest Posts With Thumbnails and Ads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6113.99 ▼0.284.86 ▲3.0241.23 ▼3.75
Dashboard /wp-admin2,192 ▲175.59 ▼0.0286.66 ▼54.3337.72 ▼11.09
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0236.05 ▼5.9032.21 ▼5.59
Add New Post /wp-admin/post-new.php1,535 ▲718.42 ▼4.71611.98 ▼44.6492.47 ▲48.28
Media Library /wp-admin/upload.php1,397 ▼64.19 ▲0.00100.08 ▼4.4642.43 ▼0.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/latest-posts-with-thumbnails-and-ads/latest-posts.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; shomtek_latest_posts has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_shomtek_latest_posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/latest-posts-with-thumbnails-and-ads/latest_posts_with_thumbnails_and_ads.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/latest-posts-with-thumbnails-and-ads/latest-posts.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The widget backend interface), #2 (The widget frontend interface)
The official readme.txt is a good inspiration

latest-posts-with-thumbnails-and-ads/latest_posts_with_thumbnails_and_ads.php 85% from 13 tests

Analyzing the main PHP file in "Latest Posts With Thumbnails and Ads" version 1.2.2
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("latest-posts-with-thumbnails-and-ads.php" instead of "latest_posts_with_thumbnails_and_ads.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 369 characters long)

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
Good job! No executable or dangerous file extensions detected2,366 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34508571,779
CSS2824283
PHP314744205
LESS161099

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity7.50
▷ Minimum method complexity1.00
▷ Maximum method complexity17.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.25MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png203.53KB58.61KB▼ 71.20%
screenshot-1.png51.52KB19.26KB▼ 62.60%