89% swift-custom-post-navigator

Code Review | Swift Custom Post Navigator

WordPress plugin Swift Custom Post Navigator scored89%from 54 tests.

About plugin

  • Plugin page: swift-custom-post...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Nov 7, 2014
  • Latest release: Jul 4, 2020
  • Number of updates: 18
  • Update frequency: every 114.8 days
  • Top authors: augustinfotech (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,649 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.25ms] Passed 4 tests

This is a short check of server-side resources used by Swift Custom Post Navigator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.28 ▲4.83
Dashboard /wp-admin3.32 ▲0.0144.85 ▼1.51
Posts /wp-admin/edit.php3.37 ▲0.0146.19 ▼4.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.06 ▼24.17
Media Library /wp-admin/upload.php3.24 ▲0.0136.22 ▲0.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Swift Custom Post Navigator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.101.69 ▼0.0442.13 ▲1.49
Dashboard /wp-admin2,209 ▲214.87 ▼0.0698.80 ▼17.9340.41 ▲1.03
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0539.34 ▲2.4337.76 ▲0.09
Add New Post /wp-admin/post-new.php1,514 ▼1917.42 ▼5.72697.93 ▲113.3358.19 ▲7.89
Media Library /wp-admin/upload.php1,385 ▲34.15 ▼0.07102.46 ▲5.0343.60 ▼0.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_ai_custompost_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Add Custom Post Selection widget and setting parameters in WordPress admin panel.), #2 (Front view of selected post.)
You can take inspiration from this readme.txt

swift-custom-post-navigator/swift-custom-post-navigator.php 92% from 13 tests

Analyzing the main PHP file in "Swift Custom Post Navigator" version 1.1
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin535 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP15357209
JavaScript211733188
CSS2151138

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
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
include/images/nav.png3.46KB1.10KB▼ 68.15%