72% gravitation-ios-showcase

Code Review | Gravitation iOS Showcase

WordPress plugin Gravitation iOS Showcase scored72%from 54 tests.

About plugin

  • Plugin page: gravitation-ios-s...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.2-4.7
  • WordPress version: 6.3.1
  • First release: May 27, 2016
  • Latest release: May 26, 2016
  • Number of updates: 3
  • Update frequency: every 65.0 days
  • Top authors: UlisesFreitas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▲35.46ms] Passed 4 tests

This is a short check of server-side resources used by Gravitation iOS Showcase
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5646.76 ▲5.39
Dashboard /wp-admin3.92 ▲0.61119.25 ▲65.63
Posts /wp-admin/edit.php3.97 ▲0.61114.86 ▲55.37
Add New Post /wp-admin/post-new.php5.75 ▼0.14134.77 ▲42.02
Media Library /wp-admin/upload.php3.84 ▲0.6174.11 ▲39.05
All iOS Apps /wp-admin/edit.php?post_type=gv_ios_showcase3.8597.16
iOS Showcase Category /wp-admin/edit-tags.php?taxonomy=gravitation_ios_showcase_cat&post_type=gv_ios_showcase3.8397.22

Server storage [IO: ▲1.86MB] [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: 133 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Gravitation iOS Showcase
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲13413.67 ▼0.717.21 ▲5.5443.07 ▲0.06
Dashboard /wp-admin2,195 ▲44.88 ▼0.05116.02 ▲10.1743.48 ▲3.37
Posts /wp-admin/edit.php2,047 ▼452.00 ▼0.1836.50 ▼5.8431.79 ▼7.63
Add New Post /wp-admin/post-new.php1,556 ▲4223.26 ▲5.59597.68 ▼24.4533.59 ▼14.07
Media Library /wp-admin/upload.php1,424 ▲364.29 ▼0.1195.99 ▼2.4140.87 ▼3.03
All iOS Apps /wp-admin/edit.php?post_type=gv_ios_showcase1,0292.0533.4633.73
iOS Showcase Category /wp-admin/edit-tags.php?taxonomy=gravitation_ios_showcase_cat&post_type=gv_ios_showcase1,2382.1726.6327.88
Search/Add App /wp-admin/gravitation-ios-showcase.php260.440.0913.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=gv_ios_showcase
    • > Notice in wp-content/plugins/gravitation-ios-showcase/gravitation-ios-showcase.php+232
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/edit.php?post_type=gv_ios_showcase
    • > Notice in wp-content/plugins/gravitation-ios-showcase/gravitation-ios-showcase.php+154
    Undefined variable: output

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
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gravitation-ios-showcase/gravitation-ios-showcase.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/gravitation-ios-showcase/single-gravitation-ios-showcase.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravitation-ios-showcase/custom-meta-boxes/classes.fields.php:633
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gravitation-ios-showcase/custom-meta-boxes/custom-meta-boxes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/gravitation-ios-showcase/content-single-gravitation-ios-showcase.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravitation-ios-showcase/custom-meta-boxes/example-functions.php:106

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/gravitation-ios-showcase.php
    • > Network (severe)
    wp-admin/gravitation-ios-showcase.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (screenshot-1.png), #2 (screenshot-5.png), #3 (screenshot-2.png), #4 (screenshot-3.png), #5 (screenshot-4.png)
You can look at the official readme.txt

gravitation-ios-showcase/gravitation-ios-showcase.php Passed 13 tests

This is the main PHP file of "Gravitation iOS Showcase" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
115 characters long description:
Gravitation iOS Showcase, is a plugin to display iOS apps on your site, with ShortCodes, You can configure options.

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
There were no executable files found in this plugin10,288 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript599588584,259
CSS183551523,265
PHP91,0355002,390
JSON600184
Markdown127072
PO File2162063
Bourne Shell124055

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity8.21
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes00.00%
Methods110
▷ Static methods21.82%
▷ Public methods10696.36%
▷ Protected methods10.91%
▷ Private methods32.73%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 1.26MB with 0.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
custom-meta-boxes/css/vendor/jquery-ui/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
screenshot-5.png262.62KB80.78KB▼ 69.24%
custom-meta-boxes/css/vendor/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
custom-meta-boxes/css/vendor/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
custom-meta-boxes/css/vendor/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%