89% simple-news-list-and-slider

Code Review | Simple News and Slider

WordPress plugin Simple News and Slider scored89%from 54 tests.

About plugin

  • Plugin page: simple-news-list-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Jun 11, 2020
  • Number of updates: 13
  • Update frequency: N/A
  • Top authors: sumitbhagirath (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /476 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.14MB] [CPU: ▼3.58ms] Passed 4 tests

A check of server-side resources used by Simple News and Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1443.76 ▲0.37
Dashboard /wp-admin3.45 ▲0.1552.29 ▼3.81
Posts /wp-admin/edit.php3.50 ▲0.1454.15 ▲4.77
Add New Post /wp-admin/post-new.php6.14 ▲0.2689.60 ▼14.61
Media Library /wp-admin/upload.php3.37 ▲0.1442.67 ▲3.73
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=news3.3738.57
News /wp-admin/edit.php?post_type=news3.4238.73
Add News /wp-admin/post-new.php?post_type=news6.1490.25
Category /wp-admin/edit-tags.php?taxonomy=news-category&post_type=news3.3739.22
Slider Settings /wp-admin/edit.php?post_type=news&page=nwowls-settings3.3434.30

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 23 new options
New WordPress options
nwowls_news_order
nwowls_news_auto_play
nwowls_news_pagination
nwowls_news_limit
nwowls_news_nav
db_upgraded
nwowls_news_read_more_text
nwowls_news_show_full_content
widget_recent-comments
can_compress_scripts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple News and Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,052 ▲29114.26 ▼0.1116.82 ▲15.2935.86 ▼6.89
Dashboard /wp-admin2,228 ▲515.56 ▼0.1184.01 ▼18.8940.22 ▲0.12
Posts /wp-admin/edit.php2,139 ▲391.99 ▲0.0138.43 ▲1.8833.98 ▼2.17
Add New Post /wp-admin/post-new.php1,563 ▲3723.13 ▲0.07668.93 ▼23.2050.11 ▼3.47
Media Library /wp-admin/upload.php1,439 ▲394.23 ▲0.03103.83 ▲3.9445.70 ▼1.73
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=news1,3582.1225.9529.02
News /wp-admin/edit.php?post_type=news1,1701.9829.9832.11
Add News /wp-admin/post-new.php?post_type=news6,25722.79862.0632.74
Category /wp-admin/edit-tags.php?taxonomy=news-category&post_type=news1,3162.1236.1234.47
Slider Settings /wp-admin/edit.php?post_type=news&page=nwowls-settings1,2561.6827.8430.53

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 23 options
    • widget_theysaidso_widget
    • nwowls_news_show_date
    • nwowls_news_show_category
    • nwowls_news_auto_play
    • nwowls_news_pagination
    • nwowls_news_nav
    • can_compress_scripts
    • nwowls_news_loop_length
    • nwowls_news_hover_pause
    • nwowls_news_order
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
The official readme.txt is a good inspiration

simple-news-list-and-slider/news-slider.php 85% from 13 tests

Analyzing the main PHP file in "Simple News and Slider" version 1.1.0
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-news-list-and-slider.php" instead of "news-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected5,957 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS9492703,128
JavaScript74979712,033
PHP62229716
Markdown142080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
11 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/owl-logo.png13.38KB4.10KB▼ 69.35%
assets/img/bird_blue_32.png1.32KB0.33KB▼ 75.15%
assets/img/feature-drag.png8.18KB2.08KB▼ 74.56%
assets/img/download.png3.66KB0.20KB▼ 94.45%
assets/img/twitter_25.png4.33KB0.72KB▼ 83.31%