90% ocean-stick-anything

Code Review | Ocean Stick Anything

WordPress plugin Ocean Stick Anything scored90%from 54 tests.

About plugin

  • Plugin page: ocean-stick-anything
  • Plugin version: 2.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 21, 2018
  • Latest release: Sep 6, 2023
  • Number of updates: 23
  • Update frequency: every 82.7 days
  • Top authors: apprimit (73.91%)oceanwp (30.43%)

Code review

54 tests

User reviews

8 reviews

Install metrics

30,000+ active /597,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.46ms] Passed 4 tests

Analyzing server-side resources used by Ocean Stick Anything
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.92 ▼7.41
Dashboard /wp-admin3.31 ▲0.0144.81 ▼3.31
Posts /wp-admin/edit.php3.36 ▲0.0144.57 ▼1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.35 ▼9.45
Media Library /wp-admin/upload.php3.23 ▲0.0132.55 ▼0.01

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
ocean-stick-anything-version
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Ocean Stick Anything: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.081.78 ▼0.3937.50 ▼5.97
Dashboard /wp-admin2,203 ▲155.79 ▼0.1194.08 ▼14.4439.60 ▼2.73
Posts /wp-admin/edit.php2,092 ▲62.00 ▼0.0435.31 ▼4.2128.70 ▼8.04
Add New Post /wp-admin/post-new.php1,542 ▲918.37 ▼4.92628.78 ▼15.8651.96 ▼1.52
Media Library /wp-admin/upload.php1,385 ▼64.28 ▲0.1294.94 ▼1.2743.59 ▲0.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • ocean-stick-anything-version
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: stick anything, oceanwp, sticky, stick

ocean-stick-anything/ocean-stick-anything.php Passed 13 tests

"Ocean Stick Anything" version 2.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
56 characters long description:
A simple plugin to stick anything you want on your site.

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 detected1,181 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1011524911
PHP280193235
CSS24335

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods17
▷ Static methods635.29%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
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
No PNG files were detected