84% annytab-photoswipe

Code Review | Annytab PhotoSwipe

WordPress plugin Annytab PhotoSwipe scored84%from 54 tests.

About plugin

  • Plugin page: annytab-photoswipe
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.6
  • WordPress version: 6.3.1
  • First release: Jul 30, 2020
  • Latest release: Nov 30, 2020
  • Number of updates: 4
  • Update frequency: every 30.8 days
  • Top authors: annytab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /516 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.69ms] Passed 4 tests

Analyzing server-side resources used by Annytab PhotoSwipe
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.17 ▼3.60
Dashboard /wp-admin3.33 ▲0.0248.24 ▼6.63
Posts /wp-admin/edit.php3.38 ▲0.0252.08 ▲0.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.35 ▼12.60
Media Library /wp-admin/upload.php3.25 ▲0.0236.81 ▲0.23

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Annytab PhotoSwipe
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲17513.36 ▼0.992.49 ▲0.6741.19 ▼1.25
Dashboard /wp-admin2,203 ▲185.80 ▼0.27104.28 ▼13.0939.64 ▼0.28
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0139.66 ▼1.7834.73 ▼4.08
Add New Post /wp-admin/post-new.php1,514 ▼517.71 ▼5.60648.06 ▼6.3850.48 ▼2.58
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.02104.92 ▼2.4442.39 ▼5.81

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/annytab-photoswipe/annytab-photoswipe.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: fancybox, gallery, images, lightbox

annytab-photoswipe/annytab-photoswipe.php Passed 13 tests

Analyzing the main PHP file in "Annytab PhotoSwipe" version 1.0.0
76 characters long description:
This plugin implements PhotoSwipe to display an image gallery in a lightbox.

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
There were no executable files found in this plugin3,942 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript69564163,331
CSS49487482
PHP1474386
PO File1101342
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/default-skin/default-skin.png0.53KB0.72KB0.00%