83% socialphotos

Code Review | Socialphotos

WordPress plugin Socialphotos scored 83% from 54 tests.

About plugin

  • Plugin page: socialphotos
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Apr 3, 2015
  • Latest release: May 26, 2015
  • Number of updates: 27
  • Update frequency: every 2.0 days
  • Top authors: RolandJeg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼299.77ms] Passed 4 tests

Server-side resources used by Socialphotos
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0353.10 ▲1.33
Dashboard /wp-admin3.43 ▲0.0233.72 ▲1.30
Posts /wp-admin/edit.php3.66 ▲0.0236.88 ▲0.56
Add New Post /wp-admin/post-new.php6.90 ▼0.0794.14 ▼1,198.60
Media Library /wp-admin/upload.php3.31 ▲0.0222.99 ▼2.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 1 new option
New WordPress options
widget_wpb_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Socialphotos
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5115.92 ▼0.075.85 ▼0.382.46 ▼0.23
Dashboard /wp-admin2,895 ▲416.10 ▼0.10115.93 ▼20.03151.66 ▼5.10
Posts /wp-admin/edit.php2,694 ▲63.25 ▲0.0163.45 ▼4.50139.96 ▼4.95
Add New Post /wp-admin/post-new.php1,661 ▲116.54 ▼0.29407.76 ▼3.48155.43 ▲0.38
Media Library /wp-admin/upload.php1,698 ▼05.52 ▼0.00135.85 ▼8.46183.49 ▼2.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_wpb_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/socialphotos/socialphotos-plugin.php:12

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

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
  • Requires at least: Invalid version format
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === socialphotos === )
Please take inspiration from this readme.txt

socialphotos/socialphotos-plugin.php 85% from 13 tests

This is the main PHP file of "Socialphotos" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("socialphotos.php" instead of "socialphotos-plugin.php")
  • Version: Plugin version missing

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected60 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1171960

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 2.17MB with 1.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png743.09KB192.53KB▼ 74.09%
assets/screenshot-2.png421.90KB107.51KB▼ 74.52%
assets/icon-128x128.png17.62KB7.06KB▼ 59.92%
assets/banner-772x250.png36.59KB12.17KB▼ 66.73%
assets/icon-256x256.png50.80KB19.03KB▼ 62.55%