84% sx-featured-page-widget

Code Review | SX Featured Page Widget

WordPress plugin SX Featured Page Widget scored 84% from 54 tests.

About plugin

  • Plugin page: sx-featured-page-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2015
  • Latest release: Dec 9, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: sabrex82 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 842 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.02MB] [CPU: ▼1.63ms] Passed 4 tests

An overview of server-side resources used by SX Featured Page Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.73 ▼0.39
Dashboard /wp-admin3.33 ▲0.0343.82 ▼2.61
Posts /wp-admin/edit.php3.38 ▲0.0246.74 ▼2.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.41 ▼1.11
Media Library /wp-admin/upload.php3.25 ▲0.0233.64 ▼0.28

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_sx_featured_page_widget
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for SX Featured Page Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▼0.271.79 ▲0.0740.89 ▼5.10
Dashboard /wp-admin2,209 ▲215.85 ▲0.97101.13 ▼10.5439.62 ▼5.21
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0142.39 ▲1.0133.87 ▼3.77
Add New Post /wp-admin/post-new.php1,536 ▲823.28 ▲5.11593.34 ▲1.8954.24 ▲3.05
Media Library /wp-admin/upload.php1,385 ▼64.20 ▼0.0499.83 ▼0.8743.38 ▼0.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_sx_featured_page_widget
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sx-featured-page-widget/sx-featured-page-widget.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: pages, featured page, widget, page widget, sidebar

sx-featured-page-widget/sx-featured-page-widget.php Passed 13 tests

The main file in "SX Featured Page Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
40 characters long description:
Feature a page and display its contents.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin119 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1193677
Markdown117042

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected