10% section-posts

Code Review | Section Posts Widget

WordPress plugin Section Posts Widget scored 10% from 54 tests.

About plugin

  • Plugin page: section-posts
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 5.8.1
  • First release: Jul 14, 2015
  • Latest release: Jul 14, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: andreweatherington (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 782 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/section-posts/section-posts.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; Section_Posts_Widget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼195.68ms] Passed 4 tests

An overview of server-side resources used by Section Posts Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.80 ▼1.045.25 ▼32.12
Dashboard /wp-admin1.82 ▼1.245.59 ▼49.27
Posts /wp-admin/edit.php1.82 ▼1.295.23 ▼44.50
Add New Post /wp-admin/post-new.php1.82 ▼3.615.63 ▼642.24
Media Library /wp-admin/upload.php1.82 ▼1.195.35 ▼46.69

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
widget_section-posts-widget

Browser metrics Passed 4 tests

Checking browser requirements for Section Posts Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.21 ▲0.578.52 ▲0.1245.15 ▼8.81
Dashboard /wp-admin2,970 ▲395.90 ▼0.05142.94 ▼5.78110.06 ▼2.92
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0265.96 ▼1.9499.74 ▲11.43
Add New Post /wp-admin/post-new.php1,683 ▲10216.53 ▼1.18369.87 ▼50.04111.46 ▼3.22
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.02149.75 ▼28.65122.27 ▼17.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/section-posts/section-posts.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; Section_Posts_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_section-posts-widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/section-posts/section-posts.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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === section-posts === )
The official readme.txt might help

section-posts/section-posts.php Passed 13 tests

The primary PHP file in "Section Posts Widget" version 0.1 is used by WordPress to initiate all plugin functionality
35 characters long description:
Displays posts related to sections.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin113 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14352113

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
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
PNG images were not found in this plugin