84% ocean-posts-slider

Code Review | Ocean Posts Slider

WordPress plugin Ocean Posts Slider scored84%from 54 tests.

About plugin

  • Plugin page: ocean-posts-slider
  • Plugin version: 2.0.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 26, 2017
  • Latest release: Sep 6, 2023
  • Number of updates: 45
  • Update frequency: every 53.6 days
  • Top authors: oceanwp (66.67%)apprimit (35.56%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10,000+ active /292,532 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 gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.57ms] Passed 4 tests

Server-side resources used by Ocean Posts Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1145.66 ▲3.04
Dashboard /wp-admin3.41 ▲0.1149.88 ▲1.01
Posts /wp-admin/edit.php3.52 ▲0.1749.00 ▼3.59
Add New Post /wp-admin/post-new.php5.99 ▲0.1098.13 ▼7.08
Media Library /wp-admin/upload.php3.33 ▲0.1041.11 ▼0.62
Add New /wp-admin/post-new.php?post_type=ocean_posts_slider3.3651.00
Posts Slider /wp-admin/edit.php?post_type=ocean_posts_slider3.3838.90

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
ocean-posts-slider-version

Browser metrics Passed 4 tests

Ocean Posts Slider: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5214.69 ▲0.431.72 ▼0.1845.46 ▲3.86
Dashboard /wp-admin2,219 ▲485.69 ▲0.0591.50 ▲0.0842.30 ▼1.17
Posts /wp-admin/edit.php2,121 ▲212.01 ▲0.0439.30 ▲0.4036.46 ▼1.17
Add New Post /wp-admin/post-new.php1,546 ▲2023.21 ▲0.05686.37 ▲5.8750.61 ▼0.70
Media Library /wp-admin/upload.php1,418 ▲214.16 ▼0.0999.06 ▼18.2545.24 ▼4.97
Add New /wp-admin/post-new.php?post_type=ocean_posts_slider1,4192.5349.3151.01
Posts Slider /wp-admin/edit.php?post_type=ocean_posts_slider1,0881.9633.3934.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • ocean-posts-slider-version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ocean-posts-slider/includes/posts-slider.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: slider, oceanwp, posts slider

ocean-posts-slider/ocean-posts-slider.php Passed 13 tests

The main PHP file in "Ocean Posts Slider" ver. 2.0.6 adds more information about the plugin and also serves as the entry point for this plugin
71 characters long description:
Display your latest posts in a beautiful slider with different options.

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
Everything looks great! No dangerous files found in this plugin2,945 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS63830931
PHP5241358924
JavaScript109677560
PO File2114116280
Sass1410240
Markdown13010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods28
▷ Static methods414.29%
▷ Public methods2589.29%
▷ Protected methods00.00%
▷ Private methods310.71%
Functions6
▷ Named functions6100.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
There were not PNG files found in your plugin