94% sif

Code Review | Sif

WordPress plugin Sif scored 94% from 54 tests.

About plugin

  • Plugin page: sif
  • Plugin version: 1.04
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 5.8.1
  • First release: Nov 17, 2017
  • Latest release: Nov 15, 2018
  • Number of updates: 25
  • Update frequency: every 14.5 days
  • Top authors: adpu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,136 total downloads

Benchmarks

Plugin footprint Passed 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.04MB] [CPU: ▼141.03ms] Passed 4 tests

An overview of server-side resources used by Sif
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0534.92 ▲1.99
Dashboard /wp-admin3.10 ▲0.0548.28 ▼0.65
Posts /wp-admin/edit.php3.22 ▲0.1146.21 ▲1.67
Add New Post /wp-admin/post-new.php5.46 ▲0.0393.87 ▼565.12
Media Library /wp-admin/upload.php3.05 ▲0.0533.48 ▼0.03

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Sif
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,793 ▲19716.37 ▲0.7415.18 ▲4.2747.34 ▲2.26
Dashboard /wp-admin2,963 ▲325.92 ▼0.21139.65 ▼6.36107.55 ▼15.65
Posts /wp-admin/edit.php2,743 ▲42.85 ▲0.1361.97 ▼4.0794.66 ▲3.69
Add New Post /wp-admin/post-new.php1,619 ▼6421.29 ▲2.42287.34 ▼205.08104.26 ▼7.57
Media Library /wp-admin/upload.php1,752 ▼555.02 ▼0.01157.87 ▼8.69118.14 ▲0.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sif/public/partials/sif-public-display.php
    • > /wp-content/plugins/sif/admin/partials/sif-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: photos, product photos, product, ecommerce, images...

sif/sif.php 92% from 13 tests

The main PHP script in "Sif" version 1.04 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
No dangerous file extensions were detected196 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12104536176
JavaScript245420
CSS2180

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.12
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.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