84% gsy-ajax-recent-posts

Code Review | GSY Ajax Recent Posts

WordPress plugin GSY Ajax Recent Posts scored84%from 54 tests.

About plugin

  • Plugin page: gsy-ajax-recent-p...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Aug 29, 2014
  • Latest release: Sep 5, 2014
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: georgi.s.yankov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,039 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by GSY Ajax Recent Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0626.96 ▼15.37
Dashboard /wp-admin3.32 ▲0.0247.95 ▼2.57
Posts /wp-admin/edit.php3.37 ▲0.0148.87 ▼2.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.49 ▼11.73
Media Library /wp-admin/upload.php3.24 ▲0.0135.68 ▼1.05

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_garp_widget
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for GSY Ajax Recent Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,251 ▲50515.17 ▲0.6193.87 ▲91.8641.26 ▼8.85
Dashboard /wp-admin2,208 ▲205.90 ▲1.00104.11 ▼0.4739.82 ▼5.11
Posts /wp-admin/edit.php2,088 ▼12.04 ▲0.0038.30 ▲0.0435.27 ▲1.02
Add New Post /wp-admin/post-new.php1,516 ▼1717.63 ▼5.73642.75 ▼46.0952.73 ▼11.22
Media Library /wp-admin/upload.php1,384 ▼14.22 ▲0.0199.48 ▼13.5450.86 ▲6.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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: Class 'WP_Widget' not found in wp-content/plugins/gsy-ajax-recent-posts/class-garp-widget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/gsy-ajax-recent-posts/class-garp-widget.php:7

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: recent-posts, widget, gsy, ajax

gsy-ajax-recent-posts/gsy-ajax-recent-posts.php 92% from 13 tests

The main file in "GSY Ajax Recent Posts" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 303 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected296 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP36897191
JavaScript113352
PO File19935
CSS22318

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/img/icons.png0.96KB0.62KB▼ 35.36%