10% latest-post-new

Code Review | LATEST-POST-NEW

WordPress plugin LATEST-POST-NEW scored 10% from 54 tests.

About plugin

  • Plugin page: latest-post-new
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 11, 2013
  • Latest release: Apr 11, 2013
  • Number of updates: 21
  • Update frequency: every 0.5 days
  • Top authors: all_is_well (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 1,762 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/latest-post-new/latest-post-new.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; fr_Excerpt_post has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼44.71ms] Passed 4 tests

This is a short check of server-side resources used by LATEST-POST-NEW
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.98 ▼32.04
Dashboard /wp-admin2.29 ▼1.0111.36 ▼37.46
Posts /wp-admin/edit.php2.29 ▼1.0611.91 ▼35.91
Add New Post /wp-admin/post-new.php2.29 ▼3.5911.08 ▼73.43
Media Library /wp-admin/upload.php2.29 ▼0.948.97 ▼23.45

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_fr_excerpt_post

Browser metrics Passed 4 tests

An overview of browser requirements for LATEST-POST-NEW
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.24 ▲0.084.75 ▲2.7545.84 ▼0.45
Dashboard /wp-admin2,206 ▼05.85 ▼0.04112.81 ▲3.4443.28 ▲0.52
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0135.24 ▼1.8335.71 ▼0.73
Add New Post /wp-admin/post-new.php1,542 ▲818.47 ▼4.68632.18 ▼32.5963.06 ▲5.89
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.02100.56 ▲0.9142.94 ▼2.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in fr_Excerpt_post is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_fr_excerpt_post
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 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/latest-post-new/latest-post-new.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: latest articles, post widget, latest post, recent post, recent articles

latest-post-new/latest-post-new.php Passed 13 tests

The entry point to "LATEST-POST-NEW" version 1.0 is a PHP file that has certain tags in its header comment area
132 characters long description:
Select the post type from available post type and add the options, so this plugin will Displays the latest post from that post type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected202 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1398202

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin