84% gdy-modular-content

Code Review | GDY Modular Content

WordPress plugin GDY Modular Content scored84%from 54 tests.

About plugin

  • Plugin page: gdy-modular-content
  • Plugin version: 0.9.88
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Jan 22, 2020
  • Number of updates: 70
  • Update frequency: every 21.5 days
  • Top authors: Grandy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /3,729 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼10.36ms] Passed 4 tests

An overview of server-side resources used by GDY Modular Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.81 ▼7.55
Dashboard /wp-admin3.37 ▲0.0345.36 ▼14.38
Posts /wp-admin/edit.php3.43 ▲0.0746.05 ▼1.15
Add New Post /wp-admin/post-new.php5.96 ▲0.0785.92 ▼16.23
Media Library /wp-admin/upload.php3.30 ▲0.0735.42 ▼3.29

Server storage [IO: ▲1.12MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 62 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
gdymc_installation_date
widget_recent-comments
gdymc_plugin_version
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GDY Modular Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲20714.57 ▲0.3728.45 ▲26.8673.93 ▲37.49
Dashboard /wp-admin2,195 ▲145.51 ▼0.2182.62 ▼27.6643.22 ▲3.37
Posts /wp-admin/edit.php2,097 ▼01.99 ▲0.0436.65 ▲0.3534.59 ▲0.88
Add New Post /wp-admin/post-new.php1,528 ▲222.97 ▼0.31666.35 ▼26.4961.04 ▲0.11
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0599.46 ▼9.9045.94 ▼1.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • gdymc_installation_date
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • gdymc_plugin_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% 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 everything seems fine, this is not 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 take a closer look at the following
  • 18× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      imagefill() expects parameter 1 to be resource, bool given in wp-content/plugins/gdy-modular-content/includes/placeholder.php on line 14
    • > PHP Warning
      imagecreatetruecolor(): Invalid image dimensions in wp-content/plugins/gdy-modular-content/includes/placeholder.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gdy-modular-content/hooks/translation.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/gdy-modular-content/includes/modulelist.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gdy-modular-content/includes/editlock.php:90
    • > PHP Warning
      imagedestroy() expects parameter 1 to be resource, bool given in wp-content/plugins/gdy-modular-content/includes/placeholder.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gdy-modular-content/includes/version.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gdy-modular-content/includes/ajax.php:6
    • > PHP Warning
      imagepng() expects parameter 1 to be resource, bool given in wp-content/plugins/gdy-modular-content/includes/placeholder.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gdy-modular-content/hooks/miscellaneous.php:7

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: gdy modular content, frontend editing, content editable, modular content, content management...

gdy-modular-content/gdy-modular-content.php Passed 13 tests

Analyzing the main PHP file in "GDY Modular Content" version 0.9.88
63 characters long description:
Create and edit modular content from the frontend of your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected20,103 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,9871,11412,354
Sass71,070135,334
PHP162,9505401,961
PO File1379974383
SVG60664
CSS7077

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions116
▷ Named functions11296.55%
▷ Anonymous functions43.45%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/stripe.png1.27KB0.16KB▼ 87.07%
images/transparent.png0.51KB0.10KB▼ 80.77%