10% wp-scroll-posts

Code Review | wp scroll posts

WordPress plugin wp scroll posts scored10%from 54 tests.

About plugin

  • Plugin page: wp-scroll-posts
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2013
  • Latest release: May 12, 2015
  • Number of updates: 24
  • Update frequency: every 26.0 days
  • Top authors: ajay3085006 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /8,166 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/wp-scroll-posts/wp-scroll-posts.php+13
    Use of undefined constant wpsp_nop - assumed 'wpsp_nop' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.42ms] Passed 4 tests

This is a short check of server-side resources used by wp scroll posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.16 ▼5.97
Dashboard /wp-admin3.41 ▲0.1045.23 ▼1.82
Posts /wp-admin/edit.php3.46 ▲0.1049.13 ▲2.04
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.52 ▼7.94
Media Library /wp-admin/upload.php3.33 ▲0.1036.08 ▲3.64

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 23 new options
New WordPress options
can_compress_scripts
wpsp_thumbnail_enable
widget_theysaidso_widget
widget_scroll_post_sp
theysaidso_admin_options
db_upgraded
wpsp_direction
wpsp_c_len
wpsp_speed
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by wp scroll posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲18813.95 ▼0.604.78 ▲2.6941.06 ▼4.17
Dashboard /wp-admin2,221 ▲305.80 ▼0.10105.40 ▲1.6375.92 ▲28.99
Posts /wp-admin/edit.php2,104 ▲151.98 ▼0.0535.39 ▼6.1729.68 ▼3.05
Add New Post /wp-admin/post-new.php1,680 ▲14922.49 ▲4.31740.74 ▲140.2453.97 ▼14.74
Media Library /wp-admin/upload.php1,406 ▲244.21 ▲0.0198.22 ▼4.0275.21 ▲32.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_scroll_post_sp
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-scroll-posts/wp-scroll-posts.php:32

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (User view after installation), #2 (Admin setting page)
The official readme.txt is a good inspiration

wp-scroll-posts/wp-scroll-posts.php Passed 13 tests

Analyzing the main PHP file in "wp scroll posts" version 0.6
133 characters long description:
Scrolls any category posts up/down in widget , page or post, have shortcode [wpsp],[wpsp cat='CategoryName'], with multiple instance

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin502 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP19829373
JavaScript13919119
CSS10010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot_2.png70.93KB25.92KB▼ 63.45%
images/icon.png3.46KB0.64KB▼ 81.51%
screenshot-2.png70.93KB25.92KB▼ 63.45%
Screenshot_1.png17.47KB7.31KB▼ 58.18%
screenshot-1.png17.47KB7.31KB▼ 58.18%