84% newpost-catch

Code Review | Newpost Catch

WordPress plugin Newpost Catch scored84%from 54 tests.

About plugin

  • Plugin page: newpost-catch
  • Plugin version: 1.3.17
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2012
  • Latest release: Dec 17, 2022
  • Number of updates: 93
  • Update frequency: every 42.2 days
  • Top authors: s56bouya (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10,000+ active /258,940 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.29ms] Passed 4 tests

This is a short check of server-side resources used by Newpost Catch
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.70 ▼6.46
Dashboard /wp-admin3.38 ▲0.0843.50 ▼0.15
Posts /wp-admin/edit.php3.43 ▲0.0742.86 ▼5.38
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.00 ▲2.85
Media Library /wp-admin/upload.php3.31 ▲0.0738.20 ▲3.50

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_newpostcatch

Browser metrics Passed 4 tests

This is an overview of browser requirements for Newpost Catch
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.63 ▼0.631.73 ▼0.3243.13 ▼8.30
Dashboard /wp-admin2,209 ▲215.89 ▲0.99100.33 ▼11.7239.50 ▼2.00
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0335.21 ▼6.3535.95 ▲0.85
Add New Post /wp-admin/post-new.php1,528 ▼522.98 ▼0.25607.20 ▼27.4656.00 ▲1.04
Media Library /wp-admin/upload.php1,391 ▲94.29 ▲0.08100.63 ▲1.6042.04 ▼1.85

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • 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 | 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/newpost-catch/class.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/newpost-catch/class.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (To display the eye-catching(Thumbnail) set to Latest Post.), #2 (Localized support is in order.), #3 (Is simple to add the side bar, to set the size of the thumbnail, posts, post date)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === newpost-catch === )
You can look at the official readme.txt

newpost-catch/newpost-catch.php Passed 13 tests

The primary PHP file in "Newpost Catch" version 1.3.17 is used by WordPress to initiate all plugin functionality
42 characters long description:
Thumbnails in new articles setting widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin398 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36370287
PO File134194
CSS18817

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity25.00
▷ Minimum class complexity14.00
▷ Maximum class complexity36.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
no_thumb.png0.80KB0.43KB▼ 46.48%
screenshot-1.png50.60KB19.75KB▼ 60.96%
screenshot-2.png11.21KB4.33KB▼ 61.34%