68% full-width-responsive-portfolio

Code Review | Full Width Responsive Portfolio

WordPress plugin Full Width Responsive Portfolio scored68%from 54 tests.

About plugin

  • Plugin page: full-width-respon...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9
  • WordPress version: 6.3.1
  • First release: May 4, 2014
  • Latest release: May 4, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: templategraphy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /6,609 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.70MB] [CPU: ▼50.21ms] Passed 4 tests

Server-side resources used by Full Width Responsive Portfolio
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.178.84 ▼34.77
Dashboard /wp-admin2.31 ▼0.999.84 ▼42.71
Posts /wp-admin/edit.php2.31 ▼1.0512.63 ▼37.42
Add New Post /wp-admin/post-new.php2.31 ▼3.5811.50 ▼85.93
Media Library /wp-admin/upload.php2.31 ▼0.929.87 ▼27.56
Category /wp-admin/edit-tags.php?taxonomy=port_tags&post_type=portfolio2.3112.78
All Items /wp-admin/edit.php?post_type=portfolio2.3110.61
Add New /wp-admin/post-new.php?post_type=portfolio2.319.87

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Full Width Responsive Portfolio: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲18413.65 ▼0.7112.22 ▲10.5552.17 ▲4.57
Dashboard /wp-admin2,229 ▲525.62 ▲0.0788.89 ▼13.1139.84 ▼6.19
Posts /wp-admin/edit.php2,131 ▲311.99 ▲0.0140.58 ▲4.1536.99 ▲2.18
Add New Post /wp-admin/post-new.php1,554 ▲2823.00 ▼0.44640.65 ▼71.3763.25 ▲2.33
Media Library /wp-admin/upload.php1,431 ▲344.19 ▲0.01104.42 ▼10.3045.88 ▼5.06
Category /wp-admin/edit-tags.php?taxonomy=port_tags&post_type=portfolio1,3052.1226.2430.06
All Items /wp-admin/edit.php?post_type=portfolio1,1001.9629.5231.98
Add New /wp-admin/post-new.php?post_type=portfolio2,2867.57168.1764.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/full-width-responsive-portfolio/custom-data.php+33
    Use of undefined constant url - assumed 'url' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Warning in wp-content/plugins/full-width-responsive-portfolio/custom-data.php+33
    Use of undefined constant url - assumed 'url' (this will throw an Error in a future version of PHP)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Warning in wp-content/plugins/full-width-responsive-portfolio/custom-data.php+33
    A non-numeric value encountered

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/full-width-responsive-portfolio/portfolio.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/full-width-responsive-portfolio/custom-data.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/full-width-responsive-portfolio/shortcode-data.php:81

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Portfolio Menu), #2 (Display Portfolio Using Shortcodes), #3 (See The Action In Front-End)
Please take inspiration from this readme.txt

full-width-responsive-portfolio/portfolio.php 92% from 13 tests

"Full Width Responsive Portfolio" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("full-width-responsive-portfolio.php" instead of "portfolio.php")

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 detected4,318 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript59875172,940
CSS4161481,189
PHP33213189

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.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
31 PNG files occupy 0.21MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/prettyPhoto/facebook/contentPatternBottom.png0.14KB0.11KB▼ 21.13%
screenshot-2.png14.86KB8.47KB▼ 43.00%
images/prettyPhoto/dark_square/btnPrevious.png1.41KB1.19KB▼ 15.74%
images/prettyPhoto/dark_square/btnNext.png1.38KB1.14KB▼ 17.29%
images/prettyPhoto/facebook/contentPatternTop.png0.14KB0.11KB▼ 21.13%