84% efm-news

Code Review | EuropaFM News

WordPress plugin EuropaFM News scored84%from 54 tests.

About plugin

  • Plugin page: efm-news
  • Plugin version: 0.6.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 30, 2017
  • Latest release: Jan 9, 2018
  • Number of updates: 11
  • Update frequency: every 7.5 days
  • Top authors: europafm (54.55%)neo2121 (54.55%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.72ms] Passed 4 tests

This is a short check of server-side resources used by EuropaFM News
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.75 ▼5.91
Dashboard /wp-admin3.32 ▲0.0150.08 ▼0.17
Posts /wp-admin/edit.php3.37 ▲0.0152.40 ▲0.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.54 ▼3.80
Media Library /wp-admin/upload.php3.24 ▲0.0132.02 ▼5.01

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

Browser metrics Passed 4 tests

Checking browser requirements for EuropaFM News
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.101.97 ▲0.2839.29 ▼4.98
Dashboard /wp-admin2,206 ▲175.88 ▲0.95108.24 ▲0.1641.59 ▲1.93
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0441.50 ▼2.5835.95 ▼2.09
Add New Post /wp-admin/post-new.php1,533 ▲1923.09 ▲5.46614.39 ▲4.9454.34 ▲5.51
Media Library /wp-admin/upload.php1,388 ▲64.22 ▼0.0997.32 ▼5.6042.25 ▼4.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_efm_news_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/efm-news/include/efm-news-widget.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: feed, news, rss, radio, europafm

efm-news/efm-news.php Passed 13 tests

This is the main PHP file of "EuropaFM News" version 0.6.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Display news from EuropaFM.ro on your website.

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
Good job! No executable or dangerous file extensions detected430 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42466379
PO File119051

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity9.75
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/efm-logo-white.png19.02KB1.46KB▼ 92.31%
res/efm-logo.png19.02KB1.46KB▼ 92.32%