78% haremo-social-screenshots

Code Review | HAREMO Social Screenshots

WordPress plugin HAREMO Social Screenshots scored78%from 54 tests.

About plugin

  • Plugin page: haremo-social-scr...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Jul 8, 2016
  • Latest release: Jul 11, 2016
  • Number of updates: 29
  • Update frequency: every 0.1 days
  • Top authors: haremo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,106 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.20MB] [CPU: ▼11.60ms] Passed 4 tests

An overview of server-side resources used by HAREMO Social Screenshots
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6615.88 ▼22.06
Dashboard /wp-admin3.33 ▲0.0345.37 ▼4.05
Posts /wp-admin/edit.php3.15 ▼0.2026.22 ▼19.10
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.17 ▼1.17
Media Library /wp-admin/upload.php3.25 ▲0.0236.08 ▲4.09

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by HAREMO Social Screenshots
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.35 ▼1.321.58 ▼0.0738.11 ▼3.97
Dashboard /wp-admin2,213 ▲224.89 ▲0.05103.56 ▲3.8740.03 ▼0.43
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0440.93 ▲0.1631.78 ▼0.40
Add New Post /wp-admin/post-new.php1,518 ▼2123.54 ▲0.38662.16 ▲20.3550.09 ▼6.02
Media Library /wp-admin/upload.php1,392 ▲74.22 ▲0.01107.94 ▲14.1846.74 ▲5.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/haremo-social-screenshots/admin/partials/social-screenshots-admin-display.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/haremo-social-screenshots/includes/background-processing/classes/wp-background-process.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/haremo-social-screenshots/includes/class-social-screenshots-http-copy.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/haremo-social-screenshots/admin/class-social-screenshots-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/haremo-social-screenshots/includes/background-processing/wp-background-processing.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/haremo-social-screenshots/public/class-social-screenshots-public.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/haremo-social-screenshots/includes/class-social-screenshots-http.php:3

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes: The official readme.txt might help

haremo-social-screenshots/social-screenshots.php 92% from 13 tests

"HAREMO Social Screenshots" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("haremo-social-screenshots.php" instead of "social-screenshots.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected645 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP16188428627
CSS12010
JavaScript1108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.55
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes218.18%
▷ Concrete classes981.82%
▷ Final classes00.00%
Methods63
▷ Static methods23.17%
▷ Public methods3758.73%
▷ Protected methods2133.33%
▷ Private methods57.94%
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
PNG images were not found in this plugin