74% projects-showroom

Code Review | Projects showroom

WordPress plugin Projects showroom scored74%from 54 tests.

About plugin

  • Plugin page: projects-showroom
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 6.3.1
  • First release: Feb 4, 2020
  • Latest release: Mar 12, 2021
  • Number of updates: 8
  • Update frequency: every 50.4 days
  • Top authors: triopsi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /614 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼8.85ms] Passed 4 tests

Server-side resources used by Projects showroom
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1641.97 ▲4.24
Dashboard /wp-admin3.47 ▲0.1246.68 ▼13.56
Posts /wp-admin/edit.php3.58 ▲0.2247.83 ▼5.47
Add New Post /wp-admin/post-new.php6.07 ▲0.1882.03 ▼20.61
Media Library /wp-admin/upload.php3.39 ▲0.1638.72 ▲6.61
All Projects /wp-admin/edit.php?post_type=psr3.4338.15
Projects Category /wp-admin/edit-tags.php?taxonomy=projects&post_type=psr3.3930.18
Projects options /wp-admin/options-general.php?page=psr3.3633.94
Help /wp-admin/edit.php?post_type=psr&page=psr_help3.3629.14
Add Project /wp-admin/post-new.php?post_type=psr3.4951.81

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
psr_plugin_version
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Projects showroom
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲20613.66 ▼0.998.74 ▲7.2842.24 ▲2.06
Dashboard /wp-admin2,253 ▲765.74 ▲0.0583.53 ▼2.7837.90 ▼4.55
Posts /wp-admin/edit.php2,157 ▲572.31 ▲0.3136.34 ▲2.9430.35 ▼7.72
Add New Post /wp-admin/post-new.php1,573 ▲4823.08 ▼0.52652.44 ▼7.7035.48 ▼15.32
Media Library /wp-admin/upload.php1,458 ▲584.52 ▲0.39111.83 ▲16.1648.35 ▲4.52
All Projects /wp-admin/edit.php?post_type=psr1,0981.9333.4740.56
Projects Category /wp-admin/edit-tags.php?taxonomy=projects&post_type=psr1,3452.0530.4625.90
Projects options /wp-admin/options-general.php?page=psr1,1542.5945.1736.02
Help /wp-admin/edit.php?post_type=psr&page=psr_help1,0012.0727.3629.04
Add Project /wp-admin/post-new.php?post_type=psr1,8483.6962.1134.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query only expected one placeholder, but an array of multiple placeholders was sent. Please see Debugging in WordPress for more information. (This message was added in version 4.9.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • psr_plugin_version
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/projects-showroom/projects-showroom.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/projects-showroom/inc/psr-post-metabox.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/projects-showroom/inc/psr-settings.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/projects-showroom/inc/psr-user.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/projects-showroom/inc/psr-admin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/projects-showroom/inc/psr-shortcode.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/projects-showroom/inc/psr-types.php:25

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: showroom, projects, shortcode, project, site...

projects-showroom/projects-showroom.php 92% from 13 tests

"Projects showroom" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,021 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP9142396684
PO File17975177
CSS273114
JavaScript33044
Markdown1002

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
assets/img/no-images-380-300.png8.75KB3.97KB▼ 54.58%
assets/img/no-images-330-254.png10.60KB5.15KB▼ 51.46%