90% latest-posts

Code Review | Latest Posts

WordPress plugin Latest Posts scored 90% from 54 tests.

About plugin

  • Plugin page: latest-posts
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 9, 2015
  • Latest release: May 25, 2023
  • Number of updates: 35
  • Update frequency: every 84.8 days
  • Top authors: rubel_miah (60%)shapedplugin (28.57%)shapedtheme (17.14%)

Code review

54 tests

User reviews

7 reviews

Install metrics

7,000+ active / 69,356 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.10ms] Passed 4 tests

Analyzing server-side resources used by Latest Posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.87 ▼1.18
Dashboard /wp-admin3.34 ▲0.0448.01 ▼6.44
Posts /wp-admin/edit.php3.39 ▲0.0448.35 ▲3.21
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.78 ▼11.24
Media Library /wp-admin/upload.php3.26 ▲0.0337.42 ▲2.46

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: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
widget_st_latest_posts_widget

Browser metrics Passed 4 tests

Latest Posts: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.55 ▼0.801.72 ▲0.0243.84 ▼19.90
Dashboard /wp-admin2,200 ▲155.79 ▼0.01105.79 ▼5.6545.63 ▲6.75
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0151.01 ▲12.6646.37 ▲12.37
Add New Post /wp-admin/post-new.php1,535 ▲223.60 ▲0.19593.02 ▼27.9080.26 ▼5.81
Media Library /wp-admin/upload.php1,388 ▲34.23 ▼0.0799.33 ▼24.8040.65 ▼5.75

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_st_latest_posts_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: widget, category posts, posts widget, latest posts widget, latest category posts...

latest-posts/latest-posts.php Passed 13 tests

The main file in "Latest Posts" v. 1.4.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
44 characters long description:
Latest Posts widget to display recent posts.

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
Success! There were no dangerous files found in this plugin159 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14218131
CSS14028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin