84% olympus-featured-posts-widget

Code Review | Featured Posts Widget

WordPress plugin Featured Posts Widget scored84%from 54 tests.

About plugin

  • Plugin page: olympus-featured-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Nov 28, 2017
  • Latest release: Nov 28, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: DannyCooper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.49ms] Passed 4 tests

A check of server-side resources used by Featured Posts Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.31 ▼5.49
Dashboard /wp-admin3.34 ▲0.0355.34 ▼1.12
Posts /wp-admin/edit.php3.39 ▲0.0354.90 ▲2.85
Add New Post /wp-admin/post-new.php5.92 ▲0.03101.48 ▼2.18
Media Library /wp-admin/upload.php3.26 ▲0.0341.54 ▲4.68

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_olympus_featured_posts_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Featured Posts Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.23 ▼1.161.91 ▲0.0942.91 ▼2.36
Dashboard /wp-admin2,209 ▲244.85 ▼0.06103.66 ▼6.0442.92 ▼2.68
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0241.89 ▲5.4036.14 ▲1.14
Add New Post /wp-admin/post-new.php1,533 ▼023.15 ▼0.24676.90 ▼4.8550.59 ▼17.95
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.00100.69 ▼16.6746.17 ▼4.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_olympus_featured_posts_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× 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/olympus-featured-posts-widget/olympus-featured-posts-widget.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: widget, popular posts widget, featured posts, featured posts widget, popular posts

olympus-featured-posts-widget/olympus-featured-posts-widget.php Passed 13 tests

"Featured Posts Widget" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
68 characters long description:
Add a selection of posts to your sidebar or another widget location.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected129 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14152105
CSS15224

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There are no PNG files in this plugin