78% ascending-posts

Code Review | Ascending Posts by FlyPlugins

WordPress plugin Ascending Posts by FlyPlugins scored78%from 54 tests.

About plugin

  • Plugin page: ascending-posts
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 27, 2012
  • Latest release: Dec 9, 2022
  • Number of updates: 45
  • Update frequency: every 84.9 days
  • Top authors: flyplugins (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

700+ active /10,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.87ms] Passed 4 tests

Analyzing server-side resources used by Ascending Posts by FlyPlugins
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.51 ▲2.65
Dashboard /wp-admin3.34 ▼0.0161.37 ▼2.15
Posts /wp-admin/edit.php3.39 ▲0.0349.58 ▼3.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.26 ▼14.28
Media Library /wp-admin/upload.php3.26 ▲0.0339.48 ▲0.48
Ascending Post /wp-admin/options-general.php?page=ascending-posts/ascendingposts.php3.2029.83

Server storage [IO: ▲0.03MB] [DB: ▲0.19MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Ascending Posts by FlyPlugins
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.35 ▼1.022.32 ▲0.5048.30 ▲4.16
Dashboard /wp-admin2,211 ▲205.08 ▲0.16108.20 ▼14.4843.01 ▼4.70
Posts /wp-admin/edit.php2,095 ▲92.02 ▲0.0140.20 ▲1.2332.69 ▼3.40
Add New Post /wp-admin/post-new.php1,533 ▲1623.18 ▲5.63690.45 ▲24.1451.87 ▼8.07
Media Library /wp-admin/upload.php1,397 ▲124.24 ▲0.0499.25 ▼1.2744.05 ▼3.00
Ascending Post /wp-admin/options-general.php?page=ascending-posts/ascendingposts.php9012.0525.7537.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=ascending-posts/ascendingposts.php
    • > Notice in wp-content/plugins/ascending-posts/fly_plugins_tools.php+33
    Undefined property: Fly_Plugin_Admin::$toc

SRP 50% from 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ascending-posts/fly_plugins_tools.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ascending-posts/fly_plugins_tools.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: descending posts, order posts ascending, order posts descending, ascending posts

ascending-posts/ascendingposts.php 85% from 13 tests

The principal PHP file in "Ascending Posts by FlyPlugins" v. 1.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ascending-posts.php" instead of "ascendingposts.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 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 plugin232 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23354174
CSS116058

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/email_sub.png0.74KB0.81KB0.00%
images/facebook-icon.png0.72KB0.90KB0.00%
images/google-plus-icon.png0.67KB0.90KB0.00%
images/fly32x32.png5.06KB1.52KB▼ 69.90%
images/youtube-icon.png3.39KB1.03KB▼ 69.58%