83% latest-post-by-ahsan

Code Review | Wordpress Latest Posts by Ahsan

WordPress plugin Wordpress Latest Posts by Ahsan scored 83% from 54 tests.

About plugin

  • Plugin page: latest-post-by-ahsan
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.3
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Aug 24, 2015
  • Number of updates: 7
  • Update frequency: every 11.7 days
  • Top authors: kingism (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,259 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.18ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Latest Posts by Ahsan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.98 ▲2.25
Dashboard /wp-admin3.31 ▲0.0045.81 ▼2.92
Posts /wp-admin/edit.php3.36 ▲0.0050.97 ▲4.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.87 ▼11.26
Media Library /wp-admin/upload.php3.23 ▲0.0034.11 ▼0.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Wordpress Latest Posts by Ahsan: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.63 ▼0.771.83 ▲0.0842.81 ▼1.06
Dashboard /wp-admin2,200 ▲155.79 ▼0.11106.61 ▼9.4440.02 ▼5.01
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0040.68 ▼0.0334.76 ▼0.91
Add New Post /wp-admin/post-new.php1,514 ▼617.70 ▼5.76690.68 ▲39.4052.00 ▼0.72
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.1094.28 ▼9.7641.15 ▼2.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/latest-post-by-ahsan/includes/wordpress-latest-posts-by-ahsan-core.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/latest-post-by-ahsan/wordpress-latest-posts-by-ahsan.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt is a good inspiration

latest-post-by-ahsan/wordpress-latest-posts-by-ahsan.php 85% from 13 tests

Analyzing the main PHP file in "Wordpress Latest Posts by Ahsan" version 1.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("latest-post-by-ahsan.php" instead of "wordpress-latest-posts-by-ahsan.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 182 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected79 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2181879

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin