90% mas-static-content

Code Review | MAS Static Content

WordPress plugin MAS Static Content scored90%from 54 tests.

About plugin

  • Plugin page: mas-static-content
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Apr 1, 2019
  • Latest release: Apr 13, 2023
  • Number of updates: 23
  • Update frequency: every 64.2 days
  • Top authors: farookibrahim (60.87%)madrasthemes (26.09%)yousufansa (21.74%)

Code review

54 tests

User reviews

1 review

Install metrics

20,000+ active /220,100 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.88ms] Passed 4 tests

Analyzing server-side resources used by MAS Static Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1142.15 ▼0.47
Dashboard /wp-admin3.40 ▲0.0546.14 ▼13.28
Posts /wp-admin/edit.php3.51 ▲0.1548.93 ▲0.66
Add New Post /wp-admin/post-new.php6.05 ▲0.1681.26 ▼22.44
Media Library /wp-admin/upload.php3.32 ▲0.0935.16 ▲2.38
All Static Contents /wp-admin/edit.php?post_type=mas_static_content3.3736.60
Categories /wp-admin/edit-tags.php?taxonomy=mas_static_content_cat&post_type=mas_static_content3.3132.51
Add New /wp-admin/post-new.php?post_type=mas_static_content6.0576.78

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
mas_static_content_queue_flush_rewrite_rules
current_theme_supports_mas_static_content
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by MAS Static Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.45 ▲0.241.81 ▲0.2244.72 ▲6.33
Dashboard /wp-admin2,234 ▲465.86 ▲0.05103.42 ▼4.0239.39 ▼2.89
Posts /wp-admin/edit.php2,120 ▲312.03 ▲0.0340.20 ▲3.1134.39 ▼0.67
Add New Post /wp-admin/post-new.php1,568 ▲5418.25 ▲0.71603.50 ▼9.4158.20 ▲8.98
Media Library /wp-admin/upload.php1,413 ▲254.20 ▼0.1295.20 ▼13.1942.44 ▼2.66
All Static Contents /wp-admin/edit.php?post_type=mas_static_content1,1001.9530.7631.99
Categories /wp-admin/edit-tags.php?taxonomy=mas_static_content_cat&post_type=mas_static_content1,2622.1425.6825.08
Add New /wp-admin/post-new.php?post_type=mas_static_content1,51116.90847.3430.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • current_theme_supports_mas_static_content
    • theysaidso_admin_options
    • mas_static_content_queue_flush_rewrite_rules
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: content types, post type, custom post types, types, custom...

mas-static-content/mas-static-content.php Passed 13 tests

The main PHP file in "MAS Static Content" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
88 characters long description:
This plugin helps to create a custom post type static content and use it with shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected268 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP462169268

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.67
▷ Minimum class complexity5.00
▷ Maximum class complexity8.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods22
▷ Static methods1150.00%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
No PNG images were found in this plugin