84% onespace-lastpost

Code Review | OneSpace Last Post

WordPress plugin OneSpace Last Post scored84%from 54 tests.

About plugin

  • Plugin page: onespace-lastpost
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: May 22, 2013
  • Latest release: Sep 5, 2014
  • Number of updates: 10
  • Update frequency: every 47.1 days
  • Top authors: igrossiter (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,731 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
Installer ran successfully

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

An overview of server-side resources used by OneSpace Last Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.84 ▼5.49
Dashboard /wp-admin3.33 ▼0.0143.67 ▼14.24
Posts /wp-admin/edit.php3.45 ▲0.0943.94 ▼3.96
Add New Post /wp-admin/post-new.php5.91 ▲0.0376.15 ▼21.69
Media Library /wp-admin/upload.php3.26 ▲0.0334.72 ▼2.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for OneSpace Last Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲2014.35 ▼0.011.69 ▼0.1639.39 ▼0.86
Dashboard /wp-admin2,198 ▲215.64 ▲0.0497.31 ▲10.3443.20 ▼0.48
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0338.92 ▲4.8935.70 ▲0.36
Add New Post /wp-admin/post-new.php1,526 ▼223.42 ▲0.23680.44 ▲17.1659.12 ▲4.86
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0498.12 ▲0.8740.09 ▼2.93

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/onespace-lastpost/plugin-functions.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/onespace-lastpost/plugin-functions.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/onespace-lastpost/plugin-functions.php:25

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === onespace-lastpost === )
You can look at the official readme.txt

onespace-lastpost/os-lastpost.php 92% from 13 tests

"OneSpace Last Post" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 ("onespace-lastpost.php" instead of "os-lastpost.php")

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
No dangerous file extensions were detected189 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP654130182
CSS11217

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.67
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods633.33%
▷ Protected methods00.00%
▷ Private methods1266.67%
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
PNG images were not found in this plugin