84% hmak-facebook-photos

Code Review | Hura Apps Photos

WordPress plugin Hura Apps Photos scored84%from 54 tests.

About plugin

  • Plugin page: hmak-facebook-photos
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2018
  • Latest release: Aug 18, 2023
  • Number of updates: 29
  • Update frequency: every 68.7 days
  • Top authors: huynhmaianhkiet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,086 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.88ms] Passed 4 tests

This is a short check of server-side resources used by Hura Apps Photos
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.04 ▼0.67
Dashboard /wp-admin3.37 ▲0.0252.25 ▼12.94
Posts /wp-admin/edit.php3.42 ▲0.0646.73 ▲3.97
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.04 ▼5.12
Media Library /wp-admin/upload.php3.30 ▲0.0635.35 ▲3.22

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Hura Apps Photos
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.24 ▼1.201.93 ▲0.0738.88 ▼5.36
Dashboard /wp-admin2,218 ▲305.90 ▲0.05102.29 ▼16.4040.72 ▼3.74
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0337.89 ▼2.0033.20 ▼1.23
Add New Post /wp-admin/post-new.php1,529 ▲917.61 ▼5.72624.95 ▼73.5855.62 ▼3.16
Media Library /wp-admin/upload.php1,403 ▲184.23 ▲0.0397.91 ▼5.1145.24 ▼0.79

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hmak-facebook-photos/Hura-Apps-Photos.php:13

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: facebook, gallery, album, page, photo...

hmak-facebook-photos/Hura-Apps-Photos.php 92% from 13 tests

Analyzing the main PHP file in "Hura Apps Photos" version 1.3.4
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("hmak-facebook-photos.php" instead of "Hura-Apps-Photos.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin516 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15713450
JavaScript10050
CSS20016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/btn-editor.png18.16KB8.10KB▼ 55.39%
icon.png1.62KB0.83KB▼ 48.61%