78% gs-projects

Code Review | Project Showcase - A WordPress Plugin to Display Projects in Various Layouts

WordPress plugin Project Showcase - A WordPress Plugin to Display Projects in Various Layouts scored78%from 54 tests.

About plugin

  • Plugin page: gs-projects
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Dec 22, 2016
  • Latest release: Aug 30, 2023
  • Number of updates: 42
  • Update frequency: every 58.1 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /6,721 total downloads

Benchmarks

Plugin footprint 82% 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.54MB] [CPU: ▲3.77ms] 75% from 4 tests

A check of server-side resources used by Project Showcase - A WordPress Plugin to Display Projects in Various Layouts
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 659.23ms on /wp-admin/edit.php?post_type=gs_projects&page=gs-project-plugins-premium)
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5243.92 ▲5.58
Dashboard /wp-admin3.91 ▲0.6059.03 ▲13.13
Posts /wp-admin/edit.php3.96 ▲0.6053.38 ▲4.72
Add New Post /wp-admin/post-new.php6.42 ▲0.5490.15 ▼4.42
Media Library /wp-admin/upload.php3.74 ▲0.5241.41 ▲9.19
GS Plugins Lite /wp-admin/edit.php?post_type=gs_projects&page=gs-project-plugins-lite4.01707.10
GS Plugins Pro /wp-admin/edit.php?post_type=gs_projects&page=gs-project-plugins-premium3.90659.23
Projects Settings /wp-admin/edit.php?post_type=gs_projects&page=projects-settings3.7337.28
Help & Usage /wp-admin/edit.php?post_type=gs_projects&page=gs-project-plugins-help3.7440.70
All Projects /wp-admin/edit.php?post_type=gs_projects3.8740.72
Add New Project /wp-admin/post-new.php?post_type=gs_projects3.9249.73

Server storage [IO: ▲1.54MB] [DB: ▲0.11MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-comments
gs_projects_settings
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
gs_projects_style_settings

Browser metrics Passed 4 tests

Project Showcase - A WordPress Plugin to Display Projects in Various Layouts: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,130 ▲39515.57 ▲0.985.40 ▲3.6341.76 ▼2.88
Dashboard /wp-admin2,445 ▲2576.79 ▲1.73129.08 ▲19.1543.09 ▼0.90
Posts /wp-admin/edit.php2,348 ▲2593.90 ▲1.8750.12 ▲9.2133.36 ▼0.50
Add New Post /wp-admin/post-new.php1,598 ▲6323.42 ▲0.22671.08 ▼25.8637.30 ▼15.78
Media Library /wp-admin/upload.php1,484 ▲964.56 ▲0.4199.10 ▼2.9843.82 ▼0.74
GS Plugins Lite /wp-admin/edit.php?post_type=gs_projects&page=gs-project-plugins-lite2,7673.3543.86156.39
GS Plugins Pro /wp-admin/edit.php?post_type=gs_projects&page=gs-project-plugins-premium2,4233.4555.1962.42
Projects Settings /wp-admin/edit.php?post_type=gs_projects&page=projects-settings1,9925.50125.9654.47
Help & Usage /wp-admin/edit.php?post_type=gs_projects&page=gs-project-plugins-help1,1653.3343.4039.40
All Projects /wp-admin/edit.php?post_type=gs_projects1,3123.6452.9631.99
Add New Project /wp-admin/post-new.php?post_type=gs_projects2,4157.92164.5167.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • gs_projects_style_settings
    • gs_projects_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-projects/gsprojects-files/includes/gs-projects-meta-fields.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gs-projects/gsprojects-files/gs-common-pages/gs-project-common-pages.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-projects/gsprojects-files/gs-projects-scripts.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gs-projects/gsprojects-files/includes/gs-projects-cpt.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'GS_Projects_WeDevs_Settings_API' not found in wp-content/plugins/gs-projects/gsprojects-files/admin/gs_projects_options_config.php:20
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/gs-projects/gsprojects-files/includes/templates/gs_projects_structure_1_square.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gs-projects/gsprojects-files/includes/gs-projects-column.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_id() in wp-content/plugins/gs-projects/gsprojects-files/includes/templates/gs_projects_structure_1_square.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/gs-projects/gsprojects-files/includes/gs-projects-shortcode.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gs-projects/gs-projects.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/edit.php?post_type=gs_projects&page=projects-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/edit.php?post_type=gs_projects&page=projects-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: projects plugin, project wordpress, project plugin, project showcase

gs-projects/gs-projects.php 85% from 13 tests

The entry point to "Project Showcase - A WordPress Plugin to Display Projects in Various Layouts" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 415 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,444 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
CSS8171272,545
PHP136237042,348
SVG300835
Sass11016521
JavaScript25467195

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity33.60
▷ Minimum class complexity3.00
▷ Maximum class complexity70.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods102
▷ Static methods10.98%
▷ Public methods8583.33%
▷ Protected methods54.90%
▷ Private methods1211.76%
Functions29
▷ Named functions2896.55%
▷ Anonymous functions13.45%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gsprojects-files/assets/img/no_img.png8.45KB3.71KB▼ 56.07%
gsprojects-files/assets/img/icon-128x128.png5.27KB3.55KB▼ 32.56%