83% blog-posts-order

Code Review | Blog Posts Order

WordPress plugin Blog Posts Order scored83%from 54 tests.

About plugin

  • Plugin page: blog-posts-order
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 6.3.1
  • First release: Dec 13, 2012
  • Latest release: Dec 13, 2012
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Gagan Goraya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /6,236 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Server-side resources used by Blog Posts Order
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.33 ▼2.24
Dashboard /wp-admin3.31 ▲0.0148.49 ▼7.23
Posts /wp-admin/edit.php3.37 ▲0.0047.98 ▼5.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.07 ▼8.31
Media Library /wp-admin/upload.php3.24 ▲0.0036.81 ▼1.37

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

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

Browser metrics Passed 4 tests

Blog Posts Order: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.271.87 ▲0.2644.24 ▼1.74
Dashboard /wp-admin2,198 ▲245.55 ▲0.0192.37 ▼9.9440.05 ▼3.92
Posts /wp-admin/edit.php2,114 ▲142.00 ▲0.0236.13 ▼1.0734.71 ▲0.67
Add New Post /wp-admin/post-new.php1,533 ▲723.39 ▼0.18706.01 ▲62.2756.45 ▲4.81
Media Library /wp-admin/upload.php1,403 ▲64.25 ▲0.05103.94 ▼10.1842.54 ▼7.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_post_type_support() in wp-content/plugins/blog-posts-order/blogpostsorder.php:16

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 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (You can apply a numerical value to each of the posts to change their order of appearance on a blog page.)
The official readme.txt might help

blog-posts-order/blogpostsorder.php 85% from 13 tests

The entry point to "Blog Posts Order" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("blog-posts-order.php" instead of "blogpostsorder.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 397 characters long)

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
Everything looks great! No dangerous files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16198

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
screenshot-1.png2.98KB1.86KB▼ 37.57%