74% projects-gallery

Code Review | Projects Gallery

WordPress plugin Projects Gallery scored74%from 54 tests.

About plugin

  • Plugin page: projects-gallery
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3
  • WordPress version: 6.3.1
  • First release: Sep 16, 2019
  • Latest release: Apr 6, 2020
  • Number of updates: 18
  • Update frequency: every 11.3 days
  • Top authors: nazaninhesamzadeh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.18ms] Passed 4 tests

A check of server-side resources used by Projects Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.50 ▼4.02
Dashboard /wp-admin3.38 ▲0.0748.08 ▼6.87
Posts /wp-admin/edit.php3.43 ▲0.0752.16 ▼4.02
Add New Post /wp-admin/post-new.php5.96 ▲0.07101.37 ▼9.80
Media Library /wp-admin/upload.php3.30 ▲0.0739.97 ▲4.09
Add New /wp-admin/admin.php?page=project-new3.2734.89
Projects Gallery /wp-admin/admin.php?page=projects3.2432.66

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: 1 new table, 7 new options
New tables
wp_projects
New WordPress options
theysaidso_admin_options
widget_recent-comments
pg_db_version
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Projects Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲16914.20 ▼0.3213.90 ▲12.2850.85 ▲3.93
Dashboard /wp-admin2,222 ▲425.64 ▲0.1191.26 ▼0.1946.09 ▲5.15
Posts /wp-admin/edit.php2,127 ▲301.94 ▼0.0841.86 ▲3.6238.35 ▲0.07
Add New Post /wp-admin/post-new.php1,548 ▲2023.80 ▲0.52665.55 ▼18.2458.74 ▲1.88
Media Library /wp-admin/upload.php1,427 ▲244.17 ▼0.01122.17 ▲20.7457.14 ▲11.76
Add New /wp-admin/admin.php?page=project-new1,0192.0427.0437.76
Projects Gallery /wp-admin/admin.php?page=projects9022.0325.2330.43

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_projects
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • pg_db_version
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=projects
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=projects
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-1.jpg) image required
The official readme.txt is a good inspiration

projects-gallery/project-gallery.php 92% from 13 tests

The main PHP file in "Projects Gallery" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("projects-gallery.php" instead of "project-gallery.php")

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
Everything looks great! No dangerous files found in this plugin7,773 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS31,3643557,329
PHP21823443
JavaScript1051

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods866.67%
▷ Protected methods00.00%
▷ Private methods433.33%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/main.png15.49KB5.98KB▼ 61.40%