10% mediapost

Code Review | @MediaPost - Formulário de cadastro

WordPress plugin @MediaPost - Formulário de cadastro scored10%from 54 tests.

About plugin

  • Plugin page: mediapost
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 28, 2016
  • Latest release: Jun 24, 2020
  • Number of updates: 9
  • Update frequency: every 158.6 days
  • Top authors: ademirdiniz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /6,430 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/mediapost/includes/client/oauth/OAuth.php+103
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.55ms] Passed 4 tests

Server-side resources used by @MediaPost - Formulário de cadastro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.76 ▼3.62
Dashboard /wp-admin3.33 ▲0.0351.46 ▲0.30
Posts /wp-admin/edit.php3.45 ▲0.0951.05 ▼8.34
Add New Post /wp-admin/post-new.php5.93 ▲0.0587.40 ▼10.55
Media Library /wp-admin/upload.php3.26 ▲0.0341.17 ▲4.17
Configurações /wp-admin/admin.php?page=mpwp_settings3.2833.75
Formulários /wp-admin/admin.php?page=mpwp_forms3.2133.80
Novo formulário /wp-admin/admin.php?page=mpwp_form3.2230.70

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 72 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
mpwp_forms_version
widget_mpwp_forms_widget
mpwp_forms_settings
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

@MediaPost - Formulário de cadastro: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.38 ▼1.001.68 ▼0.1643.13 ▲0.77
Dashboard /wp-admin2,233 ▲454.94 ▼0.95108.97 ▼5.8975.91 ▲33.51
Posts /wp-admin/edit.php2,128 ▲422.09 ▲0.0842.00 ▲2.1334.62 ▼0.41
Add New Post /wp-admin/post-new.php1,547 ▲523.22 ▲4.69801.99 ▲106.6841.62 ▼10.49
Media Library /wp-admin/upload.php1,424 ▲394.25 ▼0.00115.53 ▲11.9578.89 ▲24.62
Configurações /wp-admin/admin.php?page=mpwp_settings9771.7630.0946.54
Formulários /wp-admin/admin.php?page=mpwp_forms8061.7530.8129.73
Novo formulário /wp-admin/admin.php?page=mpwp_form8091.7930.8326.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_mpwp_forms_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP 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 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === mediapost === )
The official readme.txt is a good inspiration

mediapost/mediapost.php 92% from 13 tests

"@MediaPost - Formulário de cadastro" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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
No dangerous file extensions were detected3,056 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP283445272,197
JavaScript21835553
CSS200232
HTML30074

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.21
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods79
▷ Static methods1113.92%
▷ Public methods6784.81%
▷ Protected methods22.53%
▷ Private methods1012.66%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.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
27 PNG files occupy 0.19MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/views/models/form2.png5.30KB5.44KB0.00%
assets/images/colorpicker_submit_new.png49.22KB0.43KB▼ 99.12%
assets/images/custom_background.png1.87KB2.12KB0.00%
assets/images/custom_rgb_b.png0.98KB0.74KB▼ 25.00%
includes/admin/views/models/form1.png5.02KB5.21KB0.00%